In my experience (9yr old daughter, p5 but would be yr 5 in England), getting friends back to play etc. doesn't necessarily improve the situation. It can be a hit and a miss.
We moved her to a new school (because we moved from England to Scotland) and she has had similar issues in both schools. I would say when she was younger it was actually worse.
She doesn't like being bossed around and so sometimes steps back from the popular group. When she was younger I use to have friends back as felt she was occassionally ostracised. When the going got rough again, these same girls would then still stick in with the popular crowd, because they wanted to be friends with Queen B and didn't have the courage or inclination to befriend my daughter instead.
Also, when it happened to other girls I would try and encourage Dd to befriend whoever was ostracised at that particular time, but don't think she really did.
Since she has went back to school she has not played with the Queen B at all. Her and another friend have stuck together every day and now there are another couple playing with them. For some reason, think she has got a tad more mature (as much as a 9 yr old can be) and has told me she will not ever play with Queen B, and if on occassions she has to play by herself because of it, so be it. I have asked her if Queen B has done anything to her, or vice versa, and she is adamant she hasn't. She just thinks Queen B and crowd stand around talking etc. and she wants to run about instead.
I am not sure that having friends back cements friendships or not. In my experience it makes no difference.
If I felt my daughter was playing herself everyday and it lasted more than two weeks I would talk to her teacher.
I also think that as the girls get older the Queen B's lose some of their appeal and girls no longer gravitate towards them as much.
Hopefully some of the girls following the leader about will soon start to move away from her a bit. I am sure a general talk from the teacher to all the girls will help this process along.
I had to talk to Dd's teacher last year as Dd got school to ask me to pick her up. I knew she was fine, as asked her and she said yes. I then had to talk to the teacher as couldn't take her home knowing she was faking it.
Teacher spoke to them all, and they all played together again.