I have to agree with Walking. The most difficult challenge my son had as a young teen was 2 long-term friends who turned on him, ridiculed him publicly, etc, and he had to learn how to deal with loss and change and anger, and how to get out of bad relationships. It was awful for him to go through, and he needed a lot of support, but it was an invaluable life-lesson. And now he is more aware of what is/is not tolerable in a friendship. My son became so much stronger, so that last year when a boy with various challenges was getting under his skin, he had the skills to deal with verbal abuse, etc, and create a workable relationship with him.
It would probably be good to consult with the school therapist about the situation before transferring your D to another school--she may be able to suggest options which allow your D more agency.