Mass is lost in the form of energy. In this case, that energy is heat. For example, in a rocket, a lot of it's mass is due to it's fuel. But, once outside earth's field, it's significantly lighter because of the fuel it burned.
Same concept, applied differently.