I would respond to the student by explaining the principle of the conservation of mass, which states that mass is neither created nor destroyed in a chemical reaction. In the scenario where a solid changes to a gas, there is no loss of mass; instead, the mass remains constant. This is because the atoms and molecules that make up the solid are still present in the gas phase.
When a solid turns into a gas (sublimation or evaporation), the individual particles gain kinetic energy and move more freely, transitioning from a more ordered state to a more disordered one. However, the total mass of all the particles remains the same. It might seem like there's a loss of mass temporarily if you're only considering the contents of the bag, but you have to account for the gas molecules that have escaped into the surrounding environment.
So, there is no loss in mass when a solid changes to a gas; it's a transformation of the substance from one state to another, and the total mass remains constant.