It's not up to the managers alone to retain technical women, it's up to everyone.
I've worked in this industry since the 1990's, which is enough time to see quite a bit, and I've definitely seen behavior hostile to women during this time, and also ham-fisted attempts to fix the problem which also breed resentment towards women, causing even more of the behavior.
This whole "situation" simply boggles my mind. What could possess a guy to send a dick-pic to a coworker, or a manager to demand sex in exchange for promotion? These people are clearly messed up human beings, and need to be fired. Most of the time they are, and it takes an exceptional bro-culture for them not to be fired. However, these obnoxious pigs aren't really the core of the problem, they're just the ones we think of first.
What I've seen over time is that most people have a double standard when comparing technical men and women. These are good people who respect their co-workers, and would never do something like mentioned above, but they still make it harder for women through either unconscious biases, different expectations, or different treatment.
For example, I worked at one pre-eminent bay area company where there I saw a lot of policies meant to help female engineers and managers succeed. They were very strict on any sort of harassment policies, and usually took action against inappropriate behavior. Yet, my female co-workers were frustrated. There was a double standard in engineering. Say you go to a design review meeting for a big feature. If a man was presenting, he had the benefit of the doubt of his colleagues, presented his idea, got critiqued it, job done. A woman giving the same sort of presentation doesn't get that benefit of the doubt as frequently, and her ideas are scrutinized more, sometimes in a condescending way. I've seen this play out myself, it's disgusting! It's also not just men, women are harsher towards technical women as well.
Women who noticed such problems and tried to point them out were either treated either as whiners, or management heard and over-reacted in a way which made the men feel threatened, which made the problem worse.
I really don't know what the fix is here, but I can't see how managers can fix a cultural problem. The culture of tech needs to change to be fair to women. Perhaps this comes from having too high a concentration of one gender, since male elementary school teachers share the plight of technical women, but that's just my speculation based on people that I know.
What I am happy to see is that the ratio of women to men in technical degree programs is much greater than when I was in college in the early 90's. I do college recruiting events for computer science grads, and if I was to wager a guess, the ratio is about 1/3, and approaching half at some schools. When women are more present in the tech workforce, and their peers have always experienced working with women, perhaps then things will change.