I’m a cis guy, so feel free to ignore everything I said. Though I do want to comment because I have experienced something similar (except not in regards to gender.)
My strategy to cope with it is to take a break from whatever I was watching the instant I start experiencing this and just allow myself to feel sad for some time. I don’t think ignoring these emotions helps, so I’ll bury myself under a mountain of plushies until the negative feelings pass. Once I feel better I usually don’t have any issues with continuing the video/movie/series and actually start enjoying it again. After all, I actually want to watch them. Also, after feeling like I’m capable of rational thought again it helps to question myself why I felt upset and to think of “counterarguments” that contradict the negative thoughts.
Your mileage may vary but it can’t hurt (except momentarily) to give it a try.
Something something boiling frog