To fix this sort of problem a wholistic approach is required. Whatever the approach it should apply to all equally so that the market is fair. Offhand, my historic recollection is that STEM generally is traditionally less appealing to those of the female sex (by Science/Biology definition of the phrase), and that there might (rightly?) be a perception of poor work / life balance and career tracks that don't pair well with fulfilling time limited biological imperatives. My personal opinion is that enforced labor regulation that provides sufficient parental leave, work / life balance generally, and generally promotes healthier recognition of employees as humans would be better for society overall.
I also recognize that we're probably not going to get that until the US gets rid of the 'first past the post' madness and adopts a voting system with literally _any_ form of IRV. There just won't be bandwidth for such an issue otherwise. Of said systems, https://en.wikipedia.org/wiki/Schulze_method is my favorite, but I'd start with ANY IRV, they're (offhand) all less flawed than what we've got.