Perhaps she feels like a fish out of water after she switched schools. She's the new girl surrounded by new people. It would make sense that she feels isolated, especially since most kids have already formed tightly knit groups.
As I've suggested to the other poster, try having your daughter participate in extracurricular activities to meet other kids who are interested in the same things. Ask your daughter if she's interested in art classes, dancing classes, music, sports- anything that will have other kids in it. If she has at least one friend outside of school, she may develop her confidence again. Confidence attracts friends.
This reminds me very much of a short, five minute film I saw online. It's very inspirational. You can watch it here:
https://spiritclips.com/films/red