My dd had this situation of a threesome in year 1 and 2. Yea this is girls - threes are tough- but your dd can come out of this well.
Coach her to calmly say “I don’t like it when you are unkind” and walk away from arguments to play elsewhere. Remind her that if she is always happy and doesn’t let it get her down, everyone else will want to be her friend! And she shouldn’t let their mean comments ruin her day.
Also have loads of play dates with new potential friends.
Oh and watch lots of My Little Pony - fabulous for learning about how to recognise a “true friend”. That’s as big a deal as being a good friend.
You must accept that as personality develops, friendships definitely switch up and often that’s painful and exasperating to watch your dd go through that.
Also be extremely aware that kids heavily edit what they tell mum. You will never get “the truth” and your dd will always paint herself in the best light possible! Human nature innit.
Primary school can be rocky - y5 and y6 dramas are very challenging to parent at times!
My dd ended up in a group of 6 inseparably close friends, with another “spare” group she was welcome to tack onto if things got heated on her six.
Now she’s 14 and she has, ironically, two bffs. A perfect trio. But she has about 8 other good friends and another “out of school” bff. She drifted into new friendships age 11- 13 although stays pals with three of her original group. I am proud of how her friendships have evolved - it is not easy to steer a happy path through the bitchy years but she hasn’t batted an eyelid.
Social media actually helps with some of the teen drama as it’s very easy to stay in touch with friends at other schools who you only see maybe once a week or less!
oh you have all this ahead of you still
Good luck op