I was so glad we had a woman join our dev team some months ago. It's more fun, more relaxed and we are able to get better results as we just cover a wider area of skills. People gatekeeping programming to include only men are idiots.
That poor girl. My gf's only female teammate quit last month and i suggested she start grinding leetcode asap. Could you imagine being the only woman on a team? Pretty strong indicator that something is very wrong there.
It's the same thing with any kind of diversity. Not an expert, but anecdotally, it seems to work better if you start adding diversity at the top. At least people at the senior+ level are generally more comfortable being outliers.
Eh, my team is this way, but it's because we're aerospace adjacent which further compounds the problem. The only woman on our team is awesome and everyone gets along great. No one has an inflated ego or feels the need to one up each other though, which tends to be the root of the issue in my experience. Lots of tech bros feel the need to put others down, and see women as an easier target unfortunately.