When you shut off or pull the game out of your DS(or whatever version of the DS you have) while its saving you run the risk of making it corrupt or erase the data, its better that you just let it save if its already overwriting the data
This. It happens in any game, not just HM. It's why you always get the "please don't remove the game cartridge or switch off the <insert name of console here> while saving" because the console will get confused and will lose all of your data because it's still processing all you did during that game. So yeah, just wait for it to save next time and you won't get the problem again.