By carefully picking where to work.
A story, you could probably relate.
I used to work for a company that makes productivity software. And in my team there was a guy who was, well you can say bullied let's call him Johnny. His colleague used to occasionally start conversation on various sketchy topics and as soon as Johnny said something not in line with companys soy guidelines this guy complained to a manager about Johnnys statements being too based for that shithole. I've been in their team, and I've seen how Johnny's being provoked and how this gets escalated.
Johnny was just too damn naive to work there, and he was subjected to all kind of provocations. Some just openly mocked him. I've talked to him, I tried to help. You know, he was bullied at school just like me, we both have right-ish views, lots of stuff in common. I felt sympathy for that guy. So when I've asked why he tolerates this shit, he told me that he was bullied before and he got used to this.
He left that shithole, just like me. And I hope he's happy at his new job.
Don't go for companies, who "value their people" or "great places to work" these are the places where backstabbing and office politics flourishes.
I've never seen anything like that in companies, who push their people to work. Quite the opposite, such places are full of supportive and friendly teammates and feels almost like family.