### Godot version

4.0-rc6

### System information

Fedora 37, Mesa Intel ADL GT2

### Issue description

Code that works as expected at runtime fails with Nil references to (assigned) exported vars in the editor:

![tool_global_position_error](https://user-images.githubusercontent.com/364501/222031460-ffb1ecbd-5175-4a42-8470-25285ba5f821.png)


### Steps to reproduce

Try to access the `global_position` of a `Node3D` that's assigned to an exported var.

See that it works at runtime.

See that it errors in the editor with:

> Invalid get index 'global_position' (on base: 'Nil').

### Minimal reproduction project

[tool_test.zip](https://github.com/godotengine/godot/files/10856640/tool_test.zip)

hbox->add_child(remove_btn);
			}
			prop->update_property();
		}
		if (reorder_to_index % page_length > 0) {
			property_vbox->move_child(property_vbox->get_child(0), reorder_to_index % page_length);
		}
		updating = false;
	} else {
		if (container) {
			set_bottom_editor(nullptr);
			memdelete(container);
			button_add_item = nullptr;
			container = nullptr;
		}
	}
}
void EditorPropertyArray::_remove_pressed(int p_index) {
	Variant array = object->get_array().duplicate();
	array.call("remove_at", p_index);
	emit_changed(get_edited_property(), array, "", false);
	update_property();
}
void EditorPropertyArray::_button_draw() {
	if (dropping) {
		Color color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
		edit->draw_rect(Rect2(Point2(), edit->get_size()), color, false);
	}
}
bool EditorPropertyArray::_is_drop_valid(const Dictionary &p_drag_data) const {