It turns out that befriending people who hold opposite and even toxic opinions is actually a great way to bring them back to more moderate and rational thinking.
There is a Jordan Harbinger podcast about a black man who single-handedly dismantled multiple KKK clans literally by befriending them. The trick is to approach the other person with curiosity and reason, not with judgement and adversity. Not everyone can be talked out of being a racist (or whateverist) of course but at the end of the day we all have more in common than we have in difference and a surprising number of people are willing to change their views on an entire demographic if they aren't being shouted at, shamed, or just silently shunned.