Dear student,
Aerobic bacteria like Azotobacter and Beijerinckia carry out nitrogen fixation in the presence of oxygen by the following ways:-
1) They have higher respiratory metabolic rate which protect the enzyme from oxygen by maintaining low level of oxygen in the cell.
2) Polysaccharide slime layer produced by aerobic bacteria consisted of water that limits the rate of diffusion of oxygen to the cell.
Regards