One: more women than men leave tech because they can. For every machine learning researcher getting paid $600k to be a basically a professor-in-residence, there are 250 losers doing Scrum. Whether you're a man or a woman, it's a horrible career; the bullshit and toxicity burn you out after 10 years. Men are socialized to believe that (a) making money is their main value both to society and to the people who will depend on them, and that (b) the market will treat them fairly because "meritocracy". We learn that (b) is false in early middle age, if not before, but can't really say it too loudly because we don't want to be tagged as bitter. It's a lot more socially acceptable for a woman to downshift her career to launch a small business than for a man. There's no intrinsic reason why it should be considered usual for men in heterosexual relationships to earn more than women, but emasculating and odd for the reverse to be the case, but you'd have to undo decades of socialization in billions of people to erase that prejudice. For now, it persists, and the common view is that a woman who leaves tech is brave for no longer putting up with the toxicity; a man who leaves tech is a wimp who couldn't hack it.
Two: smart women are more likely to go into medicine, law, and general management. Why? Look-ahead. A 22-year-old heterosexual woman has dated--or at least has friends who have dated--a few 25-year-old men, and maybe one or two in their early 30s. They see where the various paths lead. They see where most techies end up by age 30, and it ain't pretty... and they realize they don't want to go there. because they're smart. The 32-year-old doctor might still have a tough life--insurance companies are the pits, and residents don't make a lot of money--but at least he doesn't have to interview for his own fucking job every morning or deal with user stories and product managers.