This diamond exoplanet lost its atmosphere — then it grew another