### Godot version

4.0.2

### System information

Windows 10 x64

### Issue description

![image](https://user-images.githubusercontent.com/2223172/231459722-294d88f9-dae3-4a3f-8e7f-e5340ca0dd25.png)
Both paths point to the same node, but the second one appears as if the node wasn't found. I assume this is because the NodePaths in array don't have the scene's node as "parent", so the path can't be resolved properly.

### Steps to reproduce

1.
```GDScript
@export var np1: NodePath
@export var np2: Array[NodePath]
```
2. Assign the same node
3. Compare the results

### Minimal reproduction project

N/A
Node *parent = get_parent();
	EditorProperty *parent_property = nullptr;
	while (parent && !parent_property) {
		parent_property = Object::cast_to<EditorProperty>(parent);
		parent = parent->get_parent();
	}
	if (parent_property) {
		EditorShaderPicker *shader_picker = Object::cast_to<EditorShaderPicker>(resource_picker);
		Object *ed_object = parent_property->get_edited_object();
		const StringName &ed_property = parent_property->get_edited_property();
		
		if ((Object::cast_to<GPUParticles2D>(ed_object) || Object::cast_to<GPUParticles3D>(ed_object)) && ed_property == SNAME("process_material")) {
			shader_picker->set_preferred_mode(Shader::MODE_PARTICLES);
		} else if (Object::cast_to<FogVolume>(ed_object)) {
			shader_picker->set_preferred_mode(Shader::MODE_FOG);
		} else if (Object::cast_to<CanvasItem>(ed_object)) {
			shader_picker->set_preferred_mode(Shader::MODE_CANVAS_ITEM);
		} else if (Object::cast_to<Node3D>(ed_object) || Object::cast_to<Mesh>(ed_object)) {
			shader_picker->set_preferred_mode(Shader::MODE_SPATIAL);
		} else if (Object::cast_to<Sky>(ed_object)) {
			shader_picker->set_preferred_mode(Shader::MODE_SKY);
		}
	}
}
void EditorPropertyResource::_viewport_selected(const NodePath &p_path) {