"I think you should add more guidance after that point."
"When you die, collected resources dissapear. "
are you sure that you didnt save after collecting the upgrade?
you can check it in the save file.
go to AppData/Local/Projeto_definitivo_v2/Save.ini
and check the value of hpmax. if you have the hp upgrade this value will be more than "100.000000".