The reason that mass is not lost when matter changes state is because of the law of conservation of mass. This particular law says that for any closed system, the mass of the system must remain constant. One of the important parts of the above statement is the "closed system" wording. If the system is entirely closed, matter and energy can't come into the system or leave the system. If matter is being conserved, and all matter has mass, then all of the mass must be conserved as well.
Lastly, the question is asking about a state change. That could be something as simple as an ice cube melting. If you have 10 grams of ice (solid water), and it melts, you still have 10 grams of water (in a liquid state). The law of conservation of mass applies to state changes and chemical changes. For example, you could burn 10 grams of paper and you'd still wind up with 10 grams of ash and various gasses, as long as the system stays closed.