### Godot version

4.0.beta10.mono.official

### System information

Windows 11

### Issue description

After registering a C# Script with Autoload and trying to connect to a signal using the `Signal.connect` method (`Singleton.Signal.connect(xxx)`) fails with `Invalid get index 'Signal' (on base: 'Node (Singleton.cs)'). But with `Object.connect` it works.

### Steps to reproduce

- Create a C# class script with a Signal named `Signal` (could be any other).
- Register it with Autoload with the name `Singleton` (could be any other).
- Create a GDScript script and try to connect the Singleton's signal using `Singleton.Signal.connect(xxx)`
- When running the project it fails with `Invalid get index 'Sample' (on base: 'Node (Singleton.cs)').`

### Minimal reproduction project

[example.zip](https://github.com/godotengine/godot/files/10414500/example.zip)

}
	ERR_FAIL_COND_V(!setter && !getter, ERR_BUG);
	if (setter) {
		int setter_argc = p_iprop.index != -1 ? 2 : 1;
		ERR_FAIL_COND_V(setter->arguments.size() != setter_argc, ERR_BUG);
	}
	if (getter) {
		int getter_argc = p_iprop.index != -1 ? 1 : 0;
		ERR_FAIL_COND_V(getter->arguments.size() != getter_argc, ERR_BUG);
	}
	if (getter && setter) {
		const ArgumentInterface &setter_first_arg = setter->arguments.back()->get();
		if (getter->return_type.cname != setter_first_arg.type.cname) {
			
			bool whitelisted = getter->return_type.cname == name_cache.type_StringName &&
					setter_first_arg.type.cname == name_cache.type_String;
			ERR_FAIL_COND_V_MSG(!whitelisted, ERR_BUG,
					"Return type from getter doesn't match first argument of setter for property: '" +
							p_itype.name + "." + String(p_iprop.cname) + "'.");
		}
	}
	const TypeReference &proptype_name = getter ? getter->return_type : setter->arguments.back()->get().type;
	const TypeInterface *prop_itype = _get_type_or_null(proptype_name);
	ERR_FAIL_NULL_V(prop_itype, ERR_BUG); 
	ERR_FAIL_COND_V_MSG(prop_itype->is_singleton, ERR_BUG,
			"Property type is a singleton: '" + p_itype.name + "." + String(p_iprop.cname) + "'.");
	if (p_itype.api_type == ClassDB::API_CORE) {
		ERR_FAIL_COND_V_MSG(prop_itype->api_type == ClassDB::API_EDITOR, ERR_BUG,
				"Property '" + p_itype.name + "." + String(p_iprop.cname) + "' has type '" + prop_itype->name +
						"' from the editor API. Core API cannot have dependencies on the editor API.");