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

if (!p_icall.is_static) {
		c_func_sig += ", IntPtr " CS_PARAM_INSTANCE;
	}
	
	int i = 0;
	for (const TypeReference &arg_type_ref : p_icall.argument_types) {
		const TypeInterface *arg_type = _get_type_or_null(arg_type_ref);
		ERR_FAIL_NULL_V(arg_type, ERR_BUG); 
		String c_param_name = "arg" + itos(i + 1);
		if (p_icall.is_vararg) {
			if (i < p_icall.get_arguments_count() - 1) {
				String c_in_vararg = arg_type->c_in_vararg;
				if (arg_type->is_object_type) {
					c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromGodotObjectPtr(%1);\n";
				}
				ERR_FAIL_COND_V_MSG(c_in_vararg.is_empty(), ERR_BUG,
						"VarArg support not implemented for parameter type: " + arg_type->name);
				c_in_statements
						<< sformat(c_in_vararg, return_type->c_type, c_param_name,
								   String(), String(), String(), INDENT3)
						<< INDENT3 C_LOCAL_PTRCALL_ARGS "[" << itos(i)
						<< "] = new IntPtr(&" << c_param_name << "_in);\n";
			}
		} else {
			if (i > 0) {
				c_args_var_content << ", ";
			}
			if (arg_type->c_in.size()) {
				c_in_statements << sformat(arg_type->c_in, arg_type->c_type, c_param_name,
						String(), String(), String(), INDENT2);