Repository: godot
Issue: Potentially undesired data loss in inherited scene when removing nodes from the base scene
Labels: bug,discussion,topic:editor

### Godot version

v4.0.3.stable.official [5222a99f5]

### System information

windows 10 x64

### Issue description

When using inherited scenes, if a node is removed from the base scene, that node also disappears from the inherited scene even if there are any changes to that node (properties, metadata, groups, connections). This seems reasonable for non-edited nodes, but I think it is undesirable for edited nodes, since the editing not only suggests that node is needed by the inherited scene but what's worse is that the edited data is lost upon saving the inherited scene.

My personal problem is while refactoring base scenes. If I do any changes in a node in the base scene the change is reflected in the inherited scene as expected and as desired. But while deleting a node in the base scene it is not always desirable to delete the node in the inherited scene for it may be being used there for something. It would be better either to automatically convert that node to a 'native' node to that scene or look for an alternative like showing a dialog while opening the scene asking whether to keep or delete the nodes

### Steps to reproduce

1. create a base scene. the root can be a node2d containing a single child which is also a node2d
1. create an inherited scene from the previously created base scene.
1. in the inherited scene change anything in the only child of the scene root node (eg: changing the position) and save.
1. go back to the base scene and delete that child node and save.
1. go back to the inherited scene. Regardless of if being opened or closed while deleting the node in the base, that node will be missing in the inherited scene.

If the node was unused (without any changes in properties, groups, meta and connections) it seems desirable to really make it go away when removing it from the parent. But if the node was used in any way in the child scene, then this is a strong indicator that the node is really needed in the child scene and thus it should be kept instead of thrown away.

I've noticed that in the tscn file, 'native' nodes have a type information, like
```tscn
[node name="MyNode" type="Node2D" parent="." index="2"]
```
whereas property editions to inherited nodes doesn't have the node type, like
```tscn
[node name="MyNode" parent="." index="2"]
```
and unedited nodes from the base scene doesn't appear at all in the inherited scene tscn (as expected).

If the existence of the type info is the only thing that differentiates a 'native' node from the edition of an inherited node, then removing the node from the base scene makes it impossible to know what type that node has, thus making it impossible to instantiate it.

Maybe we could also assign the type info to edited nodes and use another another method to differentiate native nodes from editions to inherited nodes, like
```tscn
[node name="MyNode" type="Node2D" parent="." index="2" inherited="true"]
```

This way, when opening an inherited scene and parsing a node that doesn't exist anymore in the base scene, it can be converted to a native node since the type is known, or at least we can ask the user if the nodes should be kept or removed via a dialog  or something else.

### Minimal reproduction project

N/A