Similar situation with our middle schooler, eventually full on panic attacks / meltdowns just pulling up to the school building. Our therapist and school counselor wanted us to keep trying, but I would not have been strong enough to drag him inside even if I wanted to. (And they thought we should also tell him that once he's there, he can't go home - as if that is going to make him more likely to go in the first place?!) It was triggering pretty severe depression.
We started Fusion this fall and it's working well so far - he's gone every day, doing well in his classes, keeping up with his work (admittedly his workload is very light so far, somewhat intentionally). He will actually tell people he LOVES school (ad I get a little choked up every time he does because of how bad it got last year).
There are social opportunities but my kid hasn't taken advantage of them yet; he's still warming up to the place. Yes, it's crazy expensive, but we are hopeful that after a full year at Fusion, we can get him back into a more traditional but much smaller type of school and are looking at some private schools for this. I doubt we'll ever get him back into public school, the environment is just so unconducive to learning for him.
I know a lot of people are emphatic that you have to make them keep going, but if any of my friends talked about their job like this, legitimately in tears all the time because of how much they hated it, everyone would *encourage* them to leave ASAP and find a better fit, even quitting before they have a new job if they have the support system for it. So why would we force our kids into this? People are unique, a one-size-fits-all public education is not going to work for everyone, and there's no shame in that.