### 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
}
		}
		return false;
	} else {
		const GDScriptParser::ClassNode *cl = parser.get_tree();
		HashMap<int, String> funcs;
		get_function_names_recursively(cl, "", funcs);
		for (const KeyValue<int, String> &E : funcs) {
			r_functions->push_back(E.value + ":" + itos(E.key));
		}
	}
#ifdef DEBUG_ENABLED
	if (r_safe_lines) {
		const HashSet<int> &unsafe_lines = parser.get_unsafe_lines();
		for (int i = 1; i <= parser.get_last_line_number(); i++) {
			if (!unsafe_lines.has(i)) {
				r_safe_lines->insert(i);
			}
		}
	}
#endif
	return true;
}
bool GDScriptLanguage::supports_builtin_mode() const {
	return true;
}
bool GDScriptLanguage::supports_documentation() const {
	return true;
}
int GDScriptLanguage::find_function(const String &p_function, const String &p_code) const {