I'm not sure if my view will be totally helpful, because for me school was an escape from an awful home life, so although I hated secondary school for years 7-11 (sixth form was much better), I hated my home life more. Also for me, I understood the routine of school, and what was expected of me, which I didn't at home, so it was a part of my life that made sense. That being said, I had major mental health issues throughout my school years, which being the 90s, weren't treated properly (my parents seemed normal and I was intelligent so although many of my teachers were lovely and looked out for me, they never considered that anything serious was going on, probably because they expected my parents would have brought it up).
Anyway, to answer your question, I actually did refuse to go to school for a while because I was incredibly anxious about something. Homeschooling would never have been an option for me, but I don't think being forced back to school in the way that I was was the right thing either. If I'd had supportive parents, then maybe homeschooling might have been better, but I did eventually make some friends - people I'm still in touch with now - and in sixth form with more freedom, no uniform and proper friendships, I would have picked school every time.
Your DC is still young. I would at least give them a year or two at home if you can afford to, and try to help them find coping techniques for the things they are anxious about as well. If you're worried about not being able to support them from an educational POV - they could join back into a school in year 9 (assuming you can find somewhere suitable) and still do GCSEs that way potentially. It was actually year 9 I missed part of, and I would say from a personal point of view, it's at that point that catching up becomes harder.