I think this part happens to many people some just more damaging to others.
My viewpoint is I wouldn't look to homeschool or online school to be the solution to this issue. Not because it can't be of tremendous help because it really can be but it can also just be a way to move the issue elsewhere without actually addressing it.
Kids may experience self-esteem issues for example with their peers but does taking them out of in person public school alone address that, like you said you checked in with your daughter on her mental health, are there actions being done that work in step with the adjustment to homeschool.
Agreed and I would say my viewpoint mirrors the peer issue. I wouldn't look to homeschool or online school to be the solution to this issue without having done something or tried to do something before it. Again not because it can't be of tremendous help but it's looking at what method may have been done before that such as the student talking with the teachers for help, discussing what the struggles may be (like is a learning disability not yet diagnosed) and more. I stopped being really good at math at about 7th grade, by 8th grade my brain switched to excelling in english, social studies and history. It didn't mean I was the worst at math but I really struggled with physics and calc type stuff, it just didn't click to me despite being one of the best math students in elementary school (certainly the best female in my grade levels throughout elementary school).
But that's okay, I just figured out where my struggle was and switching to home school or online school wasn't really going to improve that math front. However, if all or a majority of the subjects were hard for me that's a totally different situation and would mean a different approach to learning what may be going on. It's important to know that for the OP's daughter because it would affect their life if they went to high education as well as on the job front. My other sister-in-law has an aerospace engineering degree but has mild dyslexia and does not enjoy reading for leisure and absolutely not as a requirement, she can still excel and do well obviously but it takes understanding what the issues may be.