How do you define the surface of a star or even say a gas giant? A definition of 1 earth atmosphere would be good an initial starting point. But is this reasonable? Not quite, what about something like the density of the atmosphere that a person can breath easily? This is not to say you can breath hydrogen or helium and not die.
This comes very close to the how the aerospace industry defines ‘space’. It’s a bit the opposite in this case. At what point if a spacecraft enters the gravitational field of a mass with an atmosphere does friction heating start to occur?