My dd is year 5 had this badly a year ago, though now it has settled down quite a lot, if that gives you any hope.
Keep telling her it will change. If it's her turn today, it'll be someone else's tomorrow, sadly, and what she will learn from it, ideally, is not to revel in it when it's someone else's turn to be left out.
Sadly most kids don't think of it this way - they're just (understandably) so happy it's not them who are being left out that they join in with the nastiness and perpetuate the situation.
But it will change. I used to say this on the way home every day for months. And she'd be crying, and I almost would be, and she'd say 'but L and Z are always going to be best friends now, and R and I run away when I try to play with them, so how can it change?'.
Who knew that K who had always been in the background would suddenly become a good friend, or that T would join the class in year 5 and the whole dynamic would change again? And now dd is friends with pretty much everyone, and L and Z who spent their sleepovers making lists of who they liked in rank order and then telling everyone the list on Monday actually spend most of the time they're not together slagging one another off.
Invite one kid - maybe a different one from that group if you can.
Buy 'Queen Bees and Wannabes' - bit Americany, but I found it helped, also with my year 9 dd who went through a rough patch a while ago.
Don't know if your dd is keen on reading, and you might not approve, but I gave my year 5 Margaret Atwood's Cat's Eye to read recently and she liked it - last year I don't think she'd've been ready for it, but I think if she was going through the same thing now it would be helpful.
It will change - but doesn't your heart just ache for them until then? Good luck x