Often in physical science courses, we define the Earth system as the lithosphere (rocks), atmosphere (air), biosphere (life), and hydrosphere (water) [also sometimes separately defining a 5th aspect, the cryosphere, which is ice]
In the end, we often just think of the Earth as everything confined by its gravity (not including in orbit) as that's everything still controlled by the Earth.
But in a very true sense, you're still leaving the Earth when you take off on a plane.
Just you're still in a state/region of the Earth's system where what goes up must come down. So you won't be gone long!
The aviation and outer space communities use the Karman Line as the boundary between the Earth's atmosphere and outer space. This line is 100 km above sea level.