This happened with an open-source video game I wanted to contribute to, of all things...
I thought I'd found a welcoming community that was interested in building something cool, and I could learn some C# while contributing to something really unique and creative.
That turned out to be sort of right, but the senior maintainers decided that it's also cool to shove their politics down everyone else's throats and ban anyone who so much as sniffs at it.
They intentionally flag-wave their political stances in Discord to bait people into mentioning it, and if they don't like someone's thoughts they ban them and pat themselves on the back for ostensibly removing "toxicity" and "intolerance". When I asked them to stop doing that they tried to bait me into saying something they didn't like, and stated that their political views aren't political at all - more like natural law.
From my perspective, these people (regardless of political affiliation) act pathologically and crave the camaraderie and support of being part of an in-group, and enforce that in-group, because they probably feel generally insecure. They don't really understand the implications of their behavior, nor do they actually care about their supposed cause, they just want to feel in control and validated, and they found a venue for it.
To stop this pathological politicization you have to create an environment of security. That isn't going to happen any time soon, so I'm not sure what the point of any of this is - just avoid them and find/create communities that don't allow politics.