### 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
_find_built_in_variants(r_result, true);
	List<StringName> native_types;
	ClassDB::get_class_list(&native_types);
	for (const StringName &E : native_types) {
		if (ClassDB::is_class_exposed(E) && !Engine::get_singleton()->has_singleton(E)) {
			ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS);
			r_result.insert(option.display, option);
		}
	}
	if (p_context.current_class) {
		if (!p_inherit_only && p_context.current_class->base_type.is_set()) {
			
			List<StringName> enums;
			ClassDB::get_enum_list(p_context.current_class->base_type.native_type, &enums);
			for (const StringName &E : enums) {
				ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_ENUM);
				r_result.insert(option.display, option);
			}
		}
		
		const GDScriptParser::ClassNode *current = p_context.current_class;
		while (current) {
			for (int i = 0; i < current->members.size(); i++) {
				const GDScriptParser::ClassNode::Member &member = current->members[i];