This happens because the beaker is open.
The Law of Mass Conservation says that in a close system all the mass and energy should be the same.
If the system is open, as in the case, we can have loss of mass, due to formation of gas, that will leave the beaker to the environment, and we can also have loss of energy, because the system will exchange the energy, as heat, with the environment, causing a loss on the total energy.