Instead of respawning, just use P to travel to another world, then back to yours. you’ll reappear at your home with all items in your bag. The respawn function suicides and starts you over.
Keep in mind, however, that the P function will not be in the final game. To get your rare materials home you will physically have to travel home the same way you got to where ever you found the materials.