### 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)

const TypeInterface *return_type = _get_type_or_null(p_imethod.return_type);
	ERR_FAIL_NULL_V(return_type, ERR_BUG); 
	ERR_FAIL_COND_V_MSG(return_type->is_singleton, ERR_BUG,
			"Method return type is a singleton: '" + p_itype.name + "." + p_imethod.name + "'.");
	if (p_itype.api_type == ClassDB::API_CORE) {
		ERR_FAIL_COND_V_MSG(return_type->api_type == ClassDB::API_EDITOR, ERR_BUG,
				"Method '" + p_itype.name + "." + p_imethod.name + "' has return type '" + return_type->name +
						"' from the editor API. Core API cannot have dependencies on the editor API.");
	}
	String method_bind_field = CS_STATIC_FIELD_METHOD_BIND_PREFIX + itos(p_method_bind_count);
	String arguments_sig;
	StringBuilder cs_in_statements;
	bool cs_in_expr_is_unsafe = false;
	String icall_params = method_bind_field;
	if (!p_imethod.is_static) {
		if (p_itype.cs_in.size()) {
			cs_in_statements << sformat(p_itype.cs_in, p_itype.c_type, "this",
					String(), String(), String(), INDENT2);
		}
		icall_params += ", " + sformat(p_itype.cs_in_expr, "this");
	}
	StringBuilder default_args_doc;
	
	const ArgumentInterface &first = p_imethod.arguments.front()->get();
	for (const ArgumentInterface &iarg : p_imethod.arguments) {
		const TypeInterface *arg_type = _get_type_or_null(iarg.type);
		ERR_FAIL_NULL_V(arg_type, ERR_BUG);