Are there any invisible boarders around Earth preventing atmosphere from escaping?
Earths magnetic field is invisible and does prevent the atmosphere from escaping. If we had no magnetic field, not only would we all be roasted by the sun, but the atmosphere would be sheared away over time
This is why Mars, everyones favourite place to suicide, will never hold onto an atmosphere. Even if we made Mars a tropical oxygen rich environment.
Venus however would be a much more friendly place to colonise but I digress
So Earth holds onto an atmosphere with an invisible force called a magnetic field (among other reasons)