This is common when there are 3 girls. My granddaughter, who is very social and seems to easily fit in, has been the third one out often. Is there a way that your daughter could find another girl to play with them or even to just leave the group and play with someone else.
My granddaughter is in a YMCA after school program and when this happens they encourage the third girl to play with someone else. This is easier for them to do because they are right there supervising the play and can physically direct the child to another activity. I wonder if you and your daughter could plan some alternative activities ahead of time that your daughter could fall back on.
I've been with my granddaughter when this has happened and I've suggested that she try calling another friend. This hasn't worked so well because her friends aren't all in the same neighborhood and I'm not willing to drive miles for her to play. I am sympathetic, letting her know that feeling badly about being left out is OK, and help her find something to do on her own.
When this first started happening a couple of years ago, I talked with her about how she was feeling and what she could do to stay involved when she described a particular situation. It seemed that sometimes, at least, she had her feelings hurt and left on her own. I also remind her that the two girls that are together today may not be together tomorrow and one of them will play with her. This does happen often. When that happens can she remember how she felt and be sure to include the other girl.
Another idea is to help your daughter talk with the two girls about how she feels left out and make suggestions for what the 3 of them can do. This works sometimes on the school playground where I'm a volunteer.
It is tough to see one's child feel bereft. At the same time she will be coming up against this sort of thing all of her life and having this experience while young will help her handle it better when she's older.
I was a loner as a child and don't remember having this experience. However, as an adult, I did, and my pain hit me hard. It took some counseling for me to be able to accept that even tho my best friend had a boyfriend and seemed to not have time for me, I was still OK and could make other plans with different friends.