I had something like this with DD1, around the same age. The foursome of friends never fell out, but sometimes DD1 felt excluded (probably nothing intentional, DD1 is not always accommodating.). On quite a few occasions DD! complained to me that she didn't have anybody to play with during the break.
I organised some one on one playdates, allowing DD1 to build stronger bond with the friends in the group, and every so often I did a playdate for the 4 friends together. 3 years later, the four are still friends, but there does seem to be a definite pairing up of 2 sets of best friends.
The other thing I did was get DD1 into some hobbies that her friends were not involved in. She has made some nice friends through her hobbies, and that helped build her confidence too.
BTW - when I mentioned it in school the response was that DD1 was never on her own in the playground, that she was quite social. And this was from a very understanding teacher. So I think perhaps DD1 was not as 'alone' as she felt. But to DD1, it was how she felt.
Lastly, girls do this. Consider doing some role play, and give her some tips on how to join in, both with her own buddies, and perhaps joining in on other games that look interesting with kids outside her normal friends.
It usually gets easier as the children's social skills develop in the coming years. It certainly did for us.