I have been quite open about it in the past on social media. Lost a few friends, but no-one close. One good friend, who is my ideological polar opposite and identifies as non-binary, has remained in touch and we know that our friendship (so far) is more important than ideology. She has actually unfriended some people who were apparently awful to me online, because she's clear that any dissent needs to be measured, as do I. I'm less open now on my feed, but mainly because I don't want to lose my account rather than my friends.
In 'real life', I talk openly among friends, many of whom are in agreement - though we all have varying viewpoints when it comes to the minutiae of things. I will talk openly, but perhaps more quietly, in public.
I reserve my opinions at work because I am in a school environment and while I would be more than happy to sit and talk to anyone face-to-face, having my viewpoints passed around second-, third-, fourth-hand would not help the children who are currently questioning their sexuality and where they fit into the gender identity narrative. (Hate that word; can't think of another one.) If my job were threatened because of my beliefs and I were told I needed to change in some way that was untenable to me, I would leave before compromising my integrity in that way. Though I would try my utmost to seek out common ground and conversation first. I don't fear losing my job, and I know I'm lucky in that respect.
At home, partner and kids share similar thoughts and feelings, so there is a lot of harmony, and I am very grateful for that.
I have been in several situations that have become heated, one particularly at a dinner where I was called a transphobe. However, I've learned how to shift most circumstances so that conversation is possible, and we left the conversation peacefully and amicably. My primary tactic: to turn the questions and conversation on to my accuser/interlocutor - to get them to talk about themselves, and what they believe - and to find common ground, no matter how small that piece of ground is. If they are verging into what looks like an hysterical response, I'll ask them what's going on for them, but with genuine curiosity. I've not yet been in a situation where we can't head things off, but if I were to find myself in something that was escalating, I'd simply agree to disagree and walk off.
I avoid crowds. The psychology of a crowd is more powerful than most individuals in it, and I act accordingly and remove myself.