I was asked to carry out a questionnaire/mini investigation into this at my school.
At my sch all srudents start out doing 4 A levels then most drop to 3 (something i disapprove but a topic for another thread).
Not only do we have a low proportion of girls choosing physics, in line with national trends, but a disproportionate number were choosing physics as their one to drop.
So I asked them why, and among some other things the main response was they don't like being the only girl, or only one of two in the class.
We are trying to fix this by clustering girls where we have two classes in the same time slot - eg if 16 boys and 4 girls want to study Physics, previously we'd have 8b+2g in each class, now we'd try to have 10b in class A and 6b+4g in Class B. It seems to be helping for now.
This theory is strongly backed up by the fact all-girls' schools have disproportionately more girls choosing physics.
I'd like to think that having a female teacher might also boost retention of girls but I'm biased! And there's not much evidence of this.