### Godot version

4.1.dev (4d5f10fc3a)

### System information

macOS 13.3.0 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (8 Threads)

### Issue description

When a script was attached to a node in a saved scene and this script is exporting a member typed with `Array[Node]` . Reopening the scene when the script is missing because it was deleted or moved will cause a crash






### Steps to reproduce

1. Create a scene with two nodes
2. attach a script to the root with just one exported member typed as `Array[Node]` 
3. Add both nodes to the exported member
4. Save the scene
5. close the scene 
6. Delete the script 
7. Try to open the scene again godot will crash 

### Minimal reproduction project

with the MRP you can start reproduction steps at the sixth step.
[Test.zip](https://github.com/godotengine/godot/files/11749000/Test.zip)
ERR_FAIL_COND(!p_dictionary.has("names"));
	ERR_FAIL_COND(!p_dictionary.has("variants"));
	ERR_FAIL_COND(!p_dictionary.has("node_count"));
	ERR_FAIL_COND(!p_dictionary.has("nodes"));
	ERR_FAIL_COND(!p_dictionary.has("conn_count"));
	ERR_FAIL_COND(!p_dictionary.has("conns"));
	
	int version = 1;
	if (p_dictionary.has("version")) {
		version = p_dictionary["version"];
	}
	ERR_FAIL_COND_MSG(version > PACKED_SCENE_VERSION, "Save format version too new.");
	const int node_count = p_dictionary["node_count"];
	const Vector<int> snodes = p_dictionary["nodes"];
	ERR_FAIL_COND(snodes.size() < node_count);
	const int conn_count = p_dictionary["conn_count"];
	const Vector<int> sconns = p_dictionary["conns"];
	ERR_FAIL_COND(sconns.size() < conn_count);
	Vector<String> snames = p_dictionary["names"];
	if (snames.size()) {
		int namecount = snames.size();
		names.resize(namecount);
		const String *r = snames.ptr();
		for (int i = 0; i < names.size(); i++) {