A closer look at Atmospheric photoevaporation
Intense high-energy starlight can heat an upper atmosphere until gas escapes.
Photoevaporation can remove a substantial fraction of the envelope of a close-in low-mass planet. Core-powered mass loss uses energy released as a young planet’s interior cools to help drive atmospheric escape. A warm Neptune is a Neptune-sized or Neptune-mass planet receiving appreciably more stellar heat than our Neptune.
Compare planets near the same star. Different masses and irradiation levels can let one retain hydrogen while another loses a similar original envelope.
Want to learn more about Atmospheric photoevaporation? Photoevaporation on Wikipedia.

