Middle school is just a tough time all around so I feel for what you and your DD are going through. While my DS is not experiencing what you have written about now in middle school, when he was in 4th grade, he transferred to an all-gifted school within a school. DS is young for his grade and not a rough and tumble type. He became close friends with a few girls who had also transferred in and didn't know anyone. Even today in middle school, his ratio of friends is about 75% to 25% in favor of girls. So the suggestion above about maybe breaking into some boys groups is a good one if other avenues are not working. Sometimes the common interests are in other places.
ITA with other posters who recommend letting her know that things to get better. Best of luck to her!