Earlier quoted context omitted.
But how much of that "lack of interest" is due to the person not finding the thing interesting, or not finding the industry/their peers interesting? If there are sexists in a group, then people who are the target of that sexism are less likely to enjoy that group. As the number of women decreases in a group, then the remaining women experience more sexism. Negative feedback.
Well do you have an answer? To me it seems highly unlikely that all the women have been turned away by sexism. I remember the times when programming and computers where considered extremely unsexy and basically made you an outcast and unlikely to get a girl-friend. Computer kids back then would have been very happy to meet a girl who was interested in computer stuff.
Nerdy boys largely get ignored by their non-nerdy peers. There's an attitude of "I don't know why anybody would like that, but whatever".
On the other hand, nerdy girls are treated like absolute shit by other girls. Instead of "not my cup of tea", it's more like "eww, that's disgusting, and you're disgusting for liking it". The movie Mean Girls could have been a documentary.
And adults can influence this too. Even well-meaning feminists are more likely to steer young girls towards careers in more "acceptable" professions like business, law, or medicine rather than something down-and-dirty like engineering. And if science is involved, it's likely to be either medicine or a research career in natural sciences (e.g. physics, chemistry).