I'm really sorry she is struggling, that sounds really hard. I went through a phase of struggling with friendships as a teen, and it is truly shit. I feel for both you and your daughter.
However, I am going to be brutally honest here in the hope that it might help. If the same thing keeps happening to your dd with different groups of people, you need to look for the one common factor...which is your dd. She is probably doing something that contributes to the all the drama. Maybe the girls are all bitches and maybe they're all fake, maybe it's a toxic environment...or maybe your dd just needs to tweak her own behaviour very slightly in order to break the cycle.
My dd knows someone at school who is constantly experiencing this kind of drama. She repeatedly makes friends and then falls out with them. I know the mum and she is convinced that the dd is just the victim of other girls being mean. She probably thinks the school environment is toxic. DD's perspective is that the girl herself is very controlling and takes it quite personally if the others in the group don't bend exactly to her will. She is also very possessive and doesn't like her friends being friends with anyone else.
Not saying that your dd is like this at all, as obviously, I have no idea. I'm just trying to say that there may be some aspect of how your dd is approaching her friendships that is getting in her way. Maybe her expectations of her friends are too high, so she will inevitably be disappointed? Maybe she is expressing herself in a way that others are misinterpreting? Maybe she lacks some self awareness and doesn't always realise if she is coming across as hyper critical, or selfish, or negative, or boastful or whatever. I really don't know, but my instinct tells me that you need to get to the bottom of what's going wrong for her before you'll be able to fix it.
In the short term, it might feel kinder and more supportive to just tell her that the other girls are being bitchy, that she shouldn't take it personally and that she should just ignore it, but the reality is, that approach is not working for her or making her happy. I struggled with friends as a teen because I had really bad social skills and looking back now, I just wish that someone had addressed this with me really honestly. If it were my own dd in this situation, I would be having a very honest but kind conversation about the patterns that I had observed and I would be strongly encouraging some serious self reflection.
My own dd (also year 12) is totally different from how I was when I was growing up. She is naturally very good at making friends... mainly because she makes a real effort to push herself outside her comfort zone and talk to anyone and everyone... and she is also very good at keeping friends... mainly because she works extremely hard at it and because she is very, very good at seeing things from other people's points of view. She never gets involved in any drama, even if other friends try to initiate it. She listens to what they're upset about and tries to understand it, and she is incredibly good at stating her own perspective on a situation really calmly, honestly and empathetically. Any differences of opinion just get discussed and sorted out. I have learned loads from watching her over the years, and sometimes wish that I could go back and do the teenage years again knowing what I know now! Sadly it's too late for that! Social skills just come naturally to some very lucky people, whereas others have to work much harder at them, but the good news is, anyone can learn!
I hope that things improve for her soon!