Microorganisms that produce antibiotics are unaffected by the same antibiotic.
One of the mechanism to explain this is -
1
active pharmacophore of the bactericidal antibiotic, remains bound to antibodies while they are intracellular.
2
antibiotics are always produced in inactive forms, and get activated by the enzymatic action of the target cell.
3
microorganisms export the antibiotic, using efflux pumps, as soon as it exceeds a certain intracellular concentration.
4
antibiotics are made in parts, and are assembled after being transported to the extracellular environment.