I definitely don't think this is a new or rare problem - I'm 31, and half a lifetime ago I was refusing to go into school in Y10 and 11. I think I had a diagnosis of generalised anxiety disorder (though I'm not sure I was aware of the diagnosis at the time). I had panic attacks all the time, self-harming, no friends, it was awful.
I had a parent working at the school though, so most of the time I basically went and sat in the room they worked in to study, rather than go to lessons (obviously I appreciate not many students can do this). I also did my exams in a smaller room.
I think my anxiety resulted from a combination of factors, but in my case leaving my school definitely helped (I started sixth form there but dropped out). In the end I went to university, sat exams with everybody else in the halls no problem and got a First. I also took a language exam in May this year, because that's what I do for fun now!
I don't really have any helpful advice, these things can be very individual, for example I hated being taken to counselling and refused to speak to them, but I know that might be a really helpful option for other people. Plus I don’t even know what schools are like now. But I hope things get better for your daughter.