“Struggle to make/keep friends … She seems to not know what to talk about … She gets distressed/frustrated with her friends.”
Is the distress because they don't behave in predictable ways, seem to somehow understand better what’s happening or just don't play by the rules?
“After about 20 mins she takes a book to the bathroom and hides from them till they leave…She says she gets overwhelmed and needs a break… She says she has enough and needs to be alone.”
It may be exhausting for her trying to conform to behaving in ways she doesn't understand. Her energy is drained, and she needs to recover.
“She struggles massively with change … a huge anxiety attack… she also really struggles with maths”
Sounds like this one is a teacher capability issue.
Everything you've said here suggests she is ND (sorry to those who react to this suggestion) and not getting the support she needs. It must be like trying to communicate in a difficult other language where the grammar is incomprehensible.
Take a look at the Tell me you have a neurodiverse child thread - the struggle with change causing anxiety is so often described
She needs professional help and support, not being criticised for being rude. And you need help, too.