Armor and health upgrades give you the difference back.
Try to fix upgrade list transfer to new player on death... it doesn't work but it's closer I think.