### Godot version

4.2 f5696c3

### System information

Windows 10 x64

### Issue description

![image](https://github.com/godotengine/godot/assets/2223172/7ad0e3b6-9599-4f7b-a07c-da54779e647a)


### Steps to reproduce

1. Add node
2. Attach a built-in script
3. Add child node
4. Add script to the child node
5. In some method write `get_parent().bui`

### Minimal reproduction project

N/A
r_result.class_member = p_symbol;
						return OK;
					}
				}
				if (ClassDB::has_property(class_name, p_symbol, true)) {
					r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_PROPERTY;
					r_result.class_name = base_type.native_type;
					r_result.class_member = p_symbol;
					return OK;
				}
				StringName parent = ClassDB::get_parent_class(class_name);
				if (parent != StringName()) {
					base_type.native_type = parent;
				} else {
					base_type.kind = GDScriptParser::DataType::UNRESOLVED;
				}
			} break;
			case GDScriptParser::DataType::BUILTIN: {
				base_type.kind = GDScriptParser::DataType::UNRESOLVED;
				if (Variant::has_constant(base_type.builtin_type, p_symbol)) {
					r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_CONSTANT;
					r_result.class_name = Variant::get_type_name(base_type.builtin_type);
					r_result.class_member = p_symbol;
					return OK;
				}
				Variant v;
				Ref<RefCounted> v_ref;
				if (base_type.builtin_type == Variant::OBJECT) {
					v_ref.instantiate();
					v = v_ref;