### Godot version

4.1.dev3

### System information

Tested with Linux and Android

### Issue description

Since #73256 you can now export a typed array of nodes which holds references to the nodes assigned in the inspector. However, if you export the project you just get an empty array.

### Steps to reproduce

Export a project that makes use of exported node arrays.

### Minimal reproduction project

[test.zip](https://github.com/godotengine/godot/files/11596494/test.zip)

List<Pair<StringName, Variant>> old_state;
						if (node->get_script_instance()) {
							node->get_script_instance()->get_property_state(old_state);
						}
						node->set(snames[nprops[j].name], props[nprops[j].value], &valid);
						
						for (const Pair<StringName, Variant> &E : old_state) {
							node->set(E.first, E.second);
						}
					} else {
						Variant value = props[nprops[j].value];
						if (value.get_type() == Variant::OBJECT) {
							
							Ref<Resource> res = value;
							if (res.is_valid()) {
								if (res->is_local_to_scene()) {
									
									
									
									
									
									
									
									if (n.instance >= 0) {
										Ref<Resource> node_res = node->get(snames[nprops[j].name]);
										if (node_res.is_valid()) {
											node_res->copy_from(res);