To be honest, I'm not sure why that happens when you restart the game. I assume that it is spawning all the objects that were there when you died, but I don't know why it's happening. This was created for a game jam, so i didn't have time to sort that out.