Current patriarchal, near-totalitarian societies have huge percentages of women going into STEM because for an ambitious, smart, strong woman in that environment it's one of the few paths to independence and status obtained through a well paying STEM job.
Countries that are more egalitarian and have more social mobility have STEM percentages that are decreasing as the same society becomes more egalitarian over time because the women have other options, and they choose to take them.
I am uninterested in the actual composition of STEM. I want social mobility for women because such is correlated with population growth reduction, better health and social outcomes.
Countries that are more egalitarian and have more social mobility have STEM percentages that are decreasing as the same society becomes more egalitarian over time because the women have other options, and they choose to take them.