The radius is based on visual observation. We have good theories and models about what's happening inside the star. We are quite sure that it's mostly empty space inside the radius. But that's not a good enough reason to say that the star's radius is anything other than what we see through our telescope.

Importantly, this works for stars relatively close to us (the farthest I can find is 16,000 light years for one hyper giant) but the majority of the stars catalogued in even our own galaxy have only been assigned a radius via taking the temperature (via color) and luminosity.