Here are my thoughts as a parent with a child (now a teen) with a diagnosed anxiety disorder.
Anxiety is our natural fight or flight instinct. We need this to survive. The way I understand it, an anxiety disorder is when a person is irrationally anxious and this is causing disruption in their lives. So, the problem is not the things that cause the person to be anxious (which could be anything) so the treatment is not to remove those anxiety-inducing things from a person’s life. The problem is the person’s anxiety is so overwhelming that it is causing them to adopt unhealthy coping mechanisms. Avoidance is a very common unhealthy coping mechanism. So I wonder, if your dd wants to keep doing gymnastics, and is figuring out how to approach gymnastics in a way that works for her despite her anxiety, it may actually be the healthier choice?
A diagnosed anxiety disorder has become so prevalent in our society that I think we forget it is a “real” mental illness. It is not a state of normalcy. It is serious. It is debilitating. And it can lead to much worse issues down the line if under-treated or untreated. This is the benefit of early diagnosis. I do not know what else you are trying aside medication, but we have had varying degrees of success (along with medication) with cognitive behavioral therapy, talk therapy, and hypnotherapy- with hypnotherapy seeming to be the most effective for relief of acute anxiety in the shortest amount of time. Obviously for any of these, you need the right professional helping your child. I have also learned there is no magic treatment that fixes everything. Treatment has been a very long road with ups and downs.
Both of my sons, now in their mid teens, left gymnastics after competing for many (6-7) years. They both do other sports now. There were really hard years in there with little progress, lower scores, injuries, etc. They always knew they could leave the sport when they were ready, or stay as long as they wished. I worried a lot about them staying "too long" but we knew we could not take them out when they wanted to stay. They were clear that they did not want to quit- until they did. And after all that worry, I was super sad when they did quit! But so far, it has all worked out ok.