The way for companies to fix it is to not tolerate it. My husband’s company has in the past year started actually reprimanding and firing men who do this kind of shit (and it’s overwhelmingly men who do this). They have come to realize that it hurts morale and therefore bottom line to tolerate abusive behavior. It’s not rocket science! It’s actually quite straightforward and simple.
My husband led the charge on this when he was temporarily the head of HR, although it continued to this day. I have never been more proud of someone in my life!!!