It helps me a lot to stand up for myself.
When someone misgenders me, I determine whether it's deliberate or accidental. (Normally it's easy, but when there's doubt, I ask).
(1) When it's accidental, I insist that they apologize. Nothing major. Just, "oh, sorry about that" and then move on. No defensiveness. No explaining how hard it is. Just a quick apology and move on. If they refuse this simple and reasonable request, or don't prove willing to follow it, I reclassify the misgendering as (2) below.
(2) If it's deliberate, it is a disrespectful, willful insult, and I treat it exactly as I would any disrespectful, willful insult. I tell them I don't appreciate it, and I demand they stop. If they don't, they don't deserve my company, and I remove myself from their presence until and unless they are willing to accord me simple human respect. If it means I need to put distance between us in the future, or cut them out of my life, so be it. That's their decision to make.
I hope this helps.