I had three daughters and know this scenario well. It is tough, but it will pass. Trying to intervene in any way can exacerbate the situation. It does sound as though the ex best friend is under pressure from a gang of girls - I have seen this happen.
All you can do is to be a rock for her and keep trying to boost her self-esteem which will have taken a knock. And, as others have said, look for ways to broaden her friendship network.
It is so hard being a child sometimes - the law of the jungle seems to prevail.
Richard Osman and his House of Games
Wedding Present Dinner Service.
Sudden pain in back of leg behind knee
My daughter is lying about me and editing me out of her life.

