Hello.
I understand your dilemma. It can be detrimental for your son to be homeschooled since he won't be facing his agoraphobia. At the same time though, if he gets debilitating physical symptoms while at school, it makes it hard to justify him going when he can't function properly over there.
For agoraphobia, I suggest talking to his doctors about desensitization therapy. I took it myself when I had agoraphobia and the various steps I went through allowed me to be able to go from a total hermit to being able to go into supermarkets and shops so I can buy what I need.
If your son does need to stay homeschooled due to physical ailments, he should receive the proper help. The danger with his agoraphobia is letting it fester for too long, unchallenged. Over time, fears and anxieties get stronger and stronger and if he's homeschooled and not allowed to face his fears, he'll feel worse as time goes by. I'm speaking from personal experience too, as the same thing happened to me.
School itself can also be difficult for someone that is a loner and has anxiety, so there's that too.
It sounds like a difficult situation overall. What's best is to keep seeing his doctors and talk to them as much as possible about any and all concerns you might have. Get as many opinions and information as possible so you can take the best decision possible. Bottom line though is to keep your son engaged so that his agoraphobia doesn't get worse with time.
I hope this gives you a bit of insight. Like I said, I dealt with the same issue myself so I know how these things work, I was told many times by the therapists I saw