For what it's worth, DS seemed to take a long time to be comfortable being alone; he was probably 5 before he could even manage to go 10 minutes without calling for one of us or coming to find us. I don't think it was an anxiety issue. I think he just prefers company and/or an audience.
One thing that really helped us a lot was getting him a CD player and several CDs with stories (Greek legends, King Arthur, etc.). He plays these over and over again, often at a low volume, which makes me think he just likes the comfort of a human voice - like white noise but with gory imagery.

He can be by himself for hours now with just occasional check-ins.
As an aside, I also think the CDs - whether stories or music - keep some segment of his brain occupied, which then allows the rest of his brain to focus better on the task at hand. I wonder if it would be helpful to your DS to have music playing while he does his schoolwork.