The mass stays constant as a substance changes from a liquid to a gas.
The Law of Conservation of Mass states that, in ordinary chemical reactions, mass is neither destroyed nor created.
That is, the mass of the reactants must equal the mass of the products.
2H₂O(ℓ) ⟶ 2H₂O(g)
1 g 1 g
If the mass of liquid water is 1 g, the mass of the water vapour must be 1 g.
Even though the water vapour is a gas and you can’t see it, it still has a mass
of 1 g.