Hydrated Na2CO3 loses water to the atmosphere, changing the relative mass. This is called efflorescence.
NaOH absorbs water from the atmosphere (hygroscopic) and will even dissolve in this water (deliquescence). It also reacts with carbon dioxide in the atmosphere.
I found a similar question when i googled this and found a student room post on the same topic
Credit to Charco (user) for the answer