Diameter for diameter the solid shaft is stronger than the hollow tube....marginally.
But weight for weight the hollow tube is way much stronger, so if say you increased the diameter of the tube slightly to 25mm you could get the same torsional rigidity of the 20mm shaft for half the weight.
The central part of the shaft does not carry the same load as the outer surface, much less infact, thats why you're better off with a tube