No, it does not because the number and mass of atoms are conserved even though the number of molecules is not.
In the given equation, 2H2 + O2 → 2H2O, there are 4 hydrogen atoms and 2 oxygen atoms on the reactant side and 4 hydrogen atoms and 2 oxygen atoms on the product side. Therefore, the law of conservation of mass is upheld as the total number of each type of atom remains the same before and after the reaction.