Another thing is culture. The in the company's where I've worked at, how the men talked about women was pretty off-putting to be honest. They didn't do it in front of women (obviously), but even your nerdy developers would drop comments that had me wondering whether I was really in the ckrrect field. I'm sure the women in those places notice that even if it's behind their backs.
You could argue about whether or not it's a good proxy for success, but your response sounds like you think women would be more likely to drop out of the field alltogether than men, which doesnt appear to be true
Top earning fields (+most fields) were rife with strong resistance to hiring women. For women who'd managed jobs in top-earning professions (<pay) - this was constant, persuasive pressure to stay where they were.
source: grew up around professional women born early 1920s (budget analyst, peace corps, navy intel, usvp sec).