### 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)

case Variant::RECT2I: {
			EditorPropertyRect2i *editor = memnew(EditorPropertyRect2i(p_wide));
			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true);
			editor->setup(hint.min, hint.max, hint.suffix);
			return editor;
		} break;
		case Variant::VECTOR3: {
			EditorPropertyVector3 *editor = memnew(EditorPropertyVector3(p_wide));
			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, p_hint == PROPERTY_HINT_LINK, hint.suffix, hint.radians);
			return editor;
		} break;
		case Variant::VECTOR3I: {
			EditorPropertyVector3i *editor = memnew(EditorPropertyVector3i(p_wide));
			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true);
			editor->setup(hint.min, hint.max, 1, true, p_hint == PROPERTY_HINT_LINK, hint.suffix);
			return editor;
		} break;
		case Variant::VECTOR4: {
			EditorPropertyVector4 *editor = memnew(EditorPropertyVector4);
			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, p_hint == PROPERTY_HINT_LINK, hint.suffix);
			return editor;
		} break;
		case Variant::VECTOR4I: {
			EditorPropertyVector4i *editor = memnew(EditorPropertyVector4i);
			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true);
			editor->setup(hint.min, hint.max, 1, true, p_hint == PROPERTY_HINT_LINK, hint.suffix);
			return editor;
		} break;