I don’t often encourage parents to allow their children to make decisions about schooling, but I think your daughter may be right. She probably does need a change and since she’s asking to be homeschooled, this might be a very good option.
Without knowing your daughter, I’ll bet that she’s shy, lacking in confidence and has difficulty connecting with other kids. This isn’t all bad. I encourage you to read the book Quiet. It discusses the needs of introverts and helps us accept that many children simply don’t need a lot of friends.
I know that you feel bad that she is lonely, but – keeping her in school where she feels uncomfortable engaging new friends may be a bit too much for now.
Here’ s what I would do in your shoes:
Plan to homeschool her next year. Give her healthy reasons for your decision; don’t tell her that you’re pulling her out as a means of running from problems. Tell her that you will homeschool her with the condition that she choose a few extracurricular activities to join with other homeschooled children.
She needs socialization but she’ll probably do much better with a smaller group.
Once school gets going, have her invite one friend at a time to your home. Let her get to know one girl at a time on her turf. Then, repeat this with a few other girls.