I'm wondering though: is this just about sexism, or is it about professionalism and maturity? Getting hit on by someone higher up the hierarchy than you can make it impossible to do your job, so that behavior is clearly unprofessional. But getting yelled at by your boss for shipping a bug is also unprofessional, and can also make it a toxic work environment. I'm not saying the two are the same, just that both are examples of unprofessional behavior that many places will tolerate.
Isn't it time we have conversations about what it means to be a professional in tech? Maybe other industries suffer less from these things because they have a longer history and have more guild-like working practices, where professional behavior is more clearly defined. In tech people get away with wildly unprofessional behavior as long as "they get stuff done", and personally I never felt that was acceptable.
Maybe this stuff is also sort of everywhere. Plenty of industries have toxic working relationships. Why isn't professionalism part of standard education tracks? I studied CS and I never learned about what it means to be a professional software developer. How do you have productive conversations with coworkers? How do you organize your work effectively? All of these things you're supposed to figure out on your own, but looking around I can tell that mostly people never do, or only do so after decades of getting it wrong.