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

} else if (slice == "hide_slider") {
				hint.hide_slider = true;
			} else if (slice == "exp") {
				hint.exp_range = true;
			}
		}
	}
	bool degrees = false;
	for (int i = 0; i < slices.size(); i++) {
		String slice = slices[i].strip_edges();
		if (slice == "radians") {
			hint.radians = true;
		} else if (slice == "degrees") {
			degrees = true;
		} else if (slice.begins_with("suffix:")) {
			hint.suffix = " " + slice.replace_first("suffix:", "").strip_edges();
		}
	}
	if ((hint.radians || degrees) && hint.suffix.is_empty()) {
		hint.suffix = U"\u00B0";
	}
	ERR_FAIL_COND_V_MSG(hint.step == 0, hint,
			vformat("Invalid PROPERTY_HINT_RANGE with hint \"%s\": Step cannot be 0.", p_hint_text));
	return hint;
}
EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
	double default_float_step = EDITOR_GET("interface/inspector/default_float_step");
	switch (p_type) {
		
		case Variant::NIL: {