Psychology classes have taught me an interesting take on sexist behavior and where it might originate from.
In order to interpret situations efficiently and quickly, humans are hardwired to think in schematics. It is a survival technique that helps to identify people's intentions based on specific characteristics. This was very handy when humans still lived in tribes which were in constant conflict with each other. However, it also has meaningful and practical applications in modern times. The textbook example I have is based on the interaction with a librarian. You don't hesitate to ask a man standing at the front desk in a library for directions to a specific book. Many assumptions are made in a split second before approaching the person.
According to this school of Psychology, one could argue that the schemata for "gamers" includes sexist behavior towards women. One could certainly think this is true based on some people's behavior. We see similar behavior in certain professions, such as construction workers, where catcalling is part of their "culture".
So what can we do about it? This is where it gets tricky. Since we have identified a potential origin of this behavior, one might assume that there is a fix for it. Unfortunately, there is no easy solution. The best I can offer is "rebranding"? Basically, everyone needs to consistently call people out on their bad behavior. Complaining is the key to making society a better place for everyone. However, it only works if everyone does it and maybe, within a decade or so, sexism in gaming is a thing of the past.