I think two things are needed to reach numerical equality in the sciences. First, we need to treat young children the same regardless of gender. I can't imagine what I would be like if my parents had bought me nothing but Barbie dolls and tea party sets. Second, if we want more women in science we need to make it more prestigious. I am not surprised that the gap in gender has decreased more rapidly in law and medicine.
People respect lawyers and doctors.
They also see that there is the potential for a big paycheck. A low-paying job with low community prestige that you can't explain to your friends. Plus, if you're a woman you are outnumbered by men. And since we have been told that girls are different from boys, I see how that could be intimidating and at times maybe even lonely. I read your piece about Frances, the character created by my parents, with a mixture of delight and doubt.