### 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
}
				List<MethodInfo> virtual_methods;
				ClassDB::get_virtual_methods(class_name, &virtual_methods, true);
				for (const MethodInfo &E : virtual_methods) {
					if (E.name == p_symbol) {
						r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_METHOD;
						r_result.class_name = base_type.native_type;
						r_result.class_member = p_symbol;
						return OK;
					}
				}
				if (ClassDB::has_signal(class_name, p_symbol, true)) {
					r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_SIGNAL;
					r_result.class_name = base_type.native_type;
					r_result.class_member = p_symbol;
					return OK;
				}
				StringName enum_name = ClassDB::get_integer_constant_enum(class_name, p_symbol, true);
				if (enum_name != StringName()) {
					r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_ENUM;
					r_result.class_name = base_type.native_type;
					r_result.class_member = enum_name;
					return OK;
				}
				List<String> constants;
				ClassDB::get_integer_constant_list(class_name, &constants, true);
				for (const String &E : constants) {
					if (E == p_symbol) {
						r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_CONSTANT;
						r_result.class_name = base_type.native_type;