I recently encountered an error that has caused quite some trouble.
As an insight into what was going on:
I wanted to save the main game scene into a PackedScene that can be loaded from the title screen scene;
Everything worked as intended, minus the fact that the integral nodes (the nodes responsible for level chunks) were seemingly deleted in the saving process.
I skimmed through the saved PackedScene file only to find that it was nowhere to be found, and before anyone brings this up, some random function from my code isn't responsible for this deletion either.
What makes it more puzzling is how I achieved PackedScene saving in a different node (a chunk one) and didn't encounter any issues.
Here is the code snippet:
var saved_world = PackedScene.new()
saved_world.pack(get_tree().get_current_scene())
ResourceSaver.save(("user://user_worlds/" + str(world_id) + ".tscn"), saved_world)