It’s been many years now since I took my last astronomy class, so it escapes me how they do it, but astronomers don’t have to directly image an object to tell (in every instance) how large it is. Very ingenious indirect methods exist that allow them to make that determination for certain objects.
Even though they have to “look” through a ball of energy that is “radiating the energy of hundreds of billions of suns?”