What I said was that recent progress is the result of work that started decades ago. Harvard law graduated its first women in 1953. But back then top women law graduates were still getting offers to be secretaries. (Justice Ginsberg’s story was not at all atypical for her cohort.) That, along with the prospect of joining a 90%+ male class in and of itself dissuaded women from pursing law. Law schools fixed that by making 50-50 classes an express goal, and then achieving that goal. Then law firms made 50-50 classes of incoming associates an express goal, and achieved that goal. Gender parity was achieved not simply by accepting women to law schools, but by actively seeking to admit gender balanced classes. But once that happened, the new ratio became self-perpetuating. When being a woman lawyer no longer meant being part of a tiny minority in law school, a firm, etc., women self-selected into it when previously they had opted out.
I strongly suspect the same factors are in play in STEM: women who would be good programmers self-select out of the field because they don’t want to be the 1-2 women in a class of 20 men, or the 1-2 women programmers on a team of 20 men.