Probably a fair chance it is some form of neurodivergence (although I agree I would get the GP to run a full set of blood tests to rule out something out). I don't know if this would help her - but when I was a child, I used to often come home from school and crawl into my mother's bed and then sleep for forty minutes to an hour or so, sometimes more I think if I was really exhausted. Then I would get up, have dinner and then was in a state to tackle my homework. My mother's bed was probably because my parents' room was downstairs just down the corridor from the kitchen, so an obvious place to flop, while my own was upstairs (but it was probably better, so my bed stayed as the one for sleeping overnight, and my mother's bed was where I napped). Never formally diagnosed with neurodivergence, but with kids who are, pretty sure I am.
I also have a DD who has tended to get overexhausted from school, although not as bad as yours - or rather, it builds, so by the end of the autumn term one year we had a situation where she was too exhausted to lift up the breakfast spoon in the morning. And rushing her off to the doctor for blood tests didn't show anything significantly worrying. In my DDs case, mostly when she had been seriously flagging I have deemed it a sufficient "sickness" to keep her off school for a day or so to get her strength back - the one time we didn't when she was in her GCSE year, which is when we got to the - can't lift the spoon for breakfast stage, which then meant she needed a week off school to recover, which meant she missed more school than if I had taken preventive action earlier so I am pretty sure my instincts to keep her off for a day or so every so often were sound - but she was just so worried about the GCSEs that she wasn't prepared to let me keep her off until she had pushed herself to the point of no choice.
But my DD seems to be milder than your DD. It is one thing to build up over a term and have a day or two off, but another to need a day off every week.
I see some people have suggested home schooling, but that is a bit daunting and may well not be practical. However (if you can afford it), there are online schooling options like Kings Interhigh, which I think also runs at more primary school age (although not sure if for as young as your DD). That allows for schooling without the commute and the playground and the noise etc, and it might be something that is easier (my DD flourished educationally during lockdown - online classes worked brilliantly for her - no problems with being exhausted during that whole period despite her school running a full timetable).
Oh and my DD was (eventually) diagnosed with inattentive ADHD (she too was regarded as good as gold at school, except when she got lost of didn't have the right equipment, but being considered good was, I think, mostly because she simply wasn't there in spirit a lot of the time, she was off in her own little world and therefore caused no trouble in a class with a lot of trouble).