### 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
}
			if (_lookup_symbol_from_base(base.type, p_symbol, is_function, r_result) == OK) {
				return OK;
			}
		} break;
		case GDScriptParser::COMPLETION_TYPE_ATTRIBUTE: {
			if (context.node == nullptr || context.node->type != GDScriptParser::Node::TYPE) {
				break;
			}
			const GDScriptParser::TypeNode *type = static_cast<const GDScriptParser::TypeNode *>(context.node);
			GDScriptParser::DataType base_type;
			const GDScriptParser::IdentifierNode *prev = nullptr;
			for (const GDScriptParser::IdentifierNode *E : type->type_chain) {
				if (E->name == p_symbol && prev != nullptr) {
					base_type = prev->get_datatype();
					break;
				}
				prev = E;
			}
			if (base_type.kind != GDScriptParser::DataType::CLASS) {
				GDScriptCompletionIdentifier base;
				if (!_guess_expression_type(context, prev, base)) {
					break;
				}
				base_type = base.type;
			}
			if (_lookup_symbol_from_base(base_type, p_symbol, is_function, r_result) == OK) {
				return OK;
			}
		} break;