I got my undergrad degree in Iran (a relatively conservative society with an ultra-conservative even anti-women government), where the ratio of women to men in our computer science class was roughly 60/40 in favor of women. The ratio was similar all across the board in STEM and non-STEM fields as more women were admitted and graduated from universities than men. To get admission in Iran everyone has to go through the same standardized test nationally. Women were scoring better and better in the nationalized test than men every year until they passed men the year I went to school. (The trend continued later even prompting the government to introduce legislation to cap the ratio of women at least in certain programs.)
When I went to Europe for grad school (to a very progressive university in perhaps the most progressive European country) to my surprise I had only one female classmate who was a non-European international student in a class of 40.
I let you judge what caused this discrepancy. But I hope we can all agree the issue is much more complicated than some want to make you believe.