### 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
} else {
					Callable::CallError err;
					Variant::construct(base_type.builtin_type, v, nullptr, 0, err);
					if (err.error != Callable::CallError::CALL_OK) {
						break;
					}
				}
				if (v.has_method(p_symbol)) {
					r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_METHOD;
					r_result.class_name = Variant::get_type_name(base_type.builtin_type);
					r_result.class_member = p_symbol;
					return OK;
				}
				bool valid = false;
				v.get(p_symbol, &valid);
				if (valid) {
					r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_PROPERTY;
					r_result.class_name = Variant::get_type_name(base_type.builtin_type);
					r_result.class_member = p_symbol;
					return OK;
				}
			} break;
			default: {
				base_type.kind = GDScriptParser::DataType::UNRESOLVED;
			} break;
		}
	}
	return ERR_CANT_RESOLVE;
}
::Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol, const String &p_path, Object *p_owner, LookupResult &r_result) {