H1 would have to leave (the country) if they lose their job, so they are stuck working for a bad boss. Women can sense that, hey, this makes no sense faster than man who is somewhat expected to 'solider on'.
If there was less H1 (but more legal immigration other ways), than that would force a turn around and encourage more welcoming places. And less bad bosses.
I even look at product manager job postings and cringe: 'hold engineering team accountable for commitments'. The issue maybe that there is H1, that there are people willing to do it.