### 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
switch (member.type) {
					case GDScriptParser::ClassNode::Member::CLASS: {
						ScriptLanguage::CodeCompletionOption option(member.m_class->identifier->name, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_LOCAL);
						r_result.insert(option.display, option);
					} break;
					case GDScriptParser::ClassNode::Member::ENUM: {
						if (!p_inherit_only) {
							ScriptLanguage::CodeCompletionOption option(member.m_enum->identifier->name, ScriptLanguage::CODE_COMPLETION_KIND_ENUM, ScriptLanguage::LOCATION_LOCAL);
							r_result.insert(option.display, option);
						}
					} break;
					case GDScriptParser::ClassNode::Member::CONSTANT: {
						if (member.constant->get_datatype().is_meta_type && p_context.current_class->outer != nullptr) {
							ScriptLanguage::CodeCompletionOption option(member.constant->identifier->name, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_LOCAL);
							r_result.insert(option.display, option);
						}
					} break;
					default:
						break;
				}
			}
			current = current->outer;
		}
	}
	
	List<StringName> global_classes;
	ScriptServer::get_global_class_list(&global_classes);
	for (const StringName &E : global_classes) {
		ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_OTHER_USER_CODE);
		r_result.insert(option.display, option);