I really feel for you OP.
My experience with DD may not be relevant but I want to share it just in case.
Although she was never quite as isolated as yours, for a long time she did only have one friend, which made her quite vulnerable (when this girl was off sick/fell out with her she had nobody). Also the girl turned out to be somewhat controlling and unpleasant.
What seemed like the worst thing at the time to DD (and me if I am honest!) happened, and this girl totally ditched her without warning.
But actually, it has been the BEST thing it turns out. Because my amazing daughter was previously very much pretending to be someone she wasn't. Interested in dresses, makeup, skincare, Taylor Swift. Not that there is the remotest problem with any of these things, but my daughter just happens not to like any of that.
She never chooses to wear a dress - she likes jeans and hoodies and HMV band t-shirts and at a recent formal occasion looked amazing in a trouser suit with waistcoat and satin blouse....
She likes rock music and anime
She's gay! Or bi, I don't think she is sure yet. Either way she definitely likes girls.
(I just want to add here that she does not think she is a boy. She is a girl who likes other girls, and wearing trousers!)
Somehow, she found the strength to start being herself at school as well as at home, and now has a fantastic group of friends, boys and girls, and a total mix (some are "girly girls" for want of a better phrase, some are a bit quirkier.) What they all have in common is that they are non-judgmental and seem to accept and love my DD for the amazing, courageous individual she is! She is now invited out to all kinds of social occasions - parties, shopping, bowling, ice-skating. With individuals and in groups. She told me recently in wonder that someone in her class described her as "one of the popular ones" recently.....
I KNOW she is lucky to have found her tribe, and not everyone gets so lucky. Schools can be savage places.
But I just wanted to share her happy story in case anyone reading has a DD who is struggling currently because she is, understandabjy, afraid to be herself....