### Godot version

4.1.beta1

### System information

macOS 13.3.1

### Issue description

If you have a scene (ChildScene) with a node that has an exported typed array, for example
`@export var export_array:Array[Node]`
use the inspector to add a number of child nodes as the elements of this array and then instance this scene in another scene (ParentScene) the editor becomes prone to crashing, seemingly every time it tries to load or save ParentScene. This reliably crashes the editor, and also when opening the project after the crash, the export_array array now has added empty elements, same as the number of elements it originally had. 



### Steps to reproduce

Set up a child scene with a node with a typed export array, and set up a few child nodes to set as the items in the array in the inspector.
![Screenshot 2023-06-12 at 19 09 42](https://github.com/godotengine/godot/assets/17763524/64fc2dbc-f5ac-47ec-8ccd-73fe81894fe9)

Instanciate the childScene in another scene parentScene
![Screenshot 2023-06-12 at 19 13 02](https://github.com/godotengine/godot/assets/17763524/bfaad659-59e7-437e-a7d5-f94f4bb77b0f)

Now, go back to the childScene and save it again (with or without modification) open the parent scene and the editor will crash. When opening the editor again after the crash you can see that the array in both the instance in parentScene and the original in childScene has added empty elements (but not in the same places!). 

If you change the child scene, removing the empty rows and try to go to the parentScene you'll crash again. Open the project and the empty elements will be back. If you don't remove them and crash again, additional empty elements will have been added.

https://github.com/godotengine/godot/assets/17763524/373ef395-178a-4206-9a73-fec55e2b5a68

You can also get a warning this is happening if when you save a scene you get a bunch of errors:
`scene/main/node.cpp:1988 - Condition "!common_parent" is true. Returning: NodePath()`
Since having typed export arrays with empty items apparently causes this error (maybe this is also a bug?) so you can see that something has gone wrong and empty items have been added to your exported array.

### Minimal reproduction project

[ExportArrayTest.zip](https://www.lostminds.com/godot/ExportArrayTest.zip)
nd.properties.write[j].value = r[idx++];
			}
			nd.groups.resize(r[idx++]);
			for (int j = 0; j < nd.groups.size(); j++) {
				nd.groups.write[j] = r[idx++];
			}
		}
	}
	connections.resize(conn_count);
	if (conn_count) {
		const int *r = sconns.ptr();
		int idx = 0;
		for (int i = 0; i < conn_count; i++) {
			ConnectionData &cd = connections.write[i];
			cd.from = r[idx++];
			cd.to = r[idx++];
			cd.signal = r[idx++];
			cd.method = r[idx++];
			cd.flags = r[idx++];
			cd.binds.resize(r[idx++]);
			for (int j = 0; j < cd.binds.size(); j++) {
				cd.binds.write[j] = r[idx++];
			}
			if (version >= 3) {
				cd.unbinds = r[idx++];
			}
		}
	}
	Array np;
	if (p_dictionary.has("node_paths")) {