I went through all that myself when I was younger - not fun for me or my parents. But most people I know who had similar gender/MH issues came out the other side as normal functional adults, so keep that as some optimism.
For me, the key things that did (or would have in some cases) helped me, and might help your daughter are:
1, Remove from the context.
I think you know this from your post, but all of this is (despite what people say) highly socially contagious, especially for young teens who are so strongly influenced by their peers. Remove her as much as possible form online communities and yes changing schools, places, even trying to have some long trips, anything to get her in a new environment. with new influences. For me, one of the best places was when I was away at more rural or older/traditional places (countryside, grandparents etc.) because they were so disconnected from the mess of teenage emotions and pressures.
2, Don't let her do anything permanent.
I consider myself very lucky that on the gender front, I stopped before I caused permanent damage. I have a child now, another year or two down the road through the gender pipe-line he wouldn't exist, because I would likely be infertile. Given the chance that this is a phase or she will change her mind, absolutely and 100% push back against anything that makes it more lasting.
It is hard to do this, because teens live in the moment. As an adult I know logically they should understand that self-harm might stay with them forever, and one day they will be explaining it to their kids... but that means nothing to a teen who is only thinking about now.
3, Give her complete freedom to express herself in safe and reality-driven ways. Without judgement, comments or teasing. If she wants short hair, to go to the gym, or do any "boys" things, no problem. If she never wears a dress, fine.. if she wants to date girls, fine, be the "man" of the house (whatever that means to her) fine... etc. She can be whatever she wants to be, but within the boundaries of reality (she is a girl, she is human) and without causing lasting damage (self-harm, surgery, hormones etc.).
This only works though if she doesn't get judged. if people in her family are saying "yeah, you do whatever you want" but then she hears laughter, sees people sniggering and laughing to themselves, or overhears comments etc .it won't work.
Aside from that
4, Listen to her a lot - let her talk it through with you, and resist objecting or interrupting, when you hear silly things (unless it is dangerous to her). Of course it is silly, she is a young teenager. Better she feels comfortable talking to you about it than others. Also that will help you find solutions for her.