### 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 (arg_type->cs_in.size()) {
				cs_in_statements << sformat(arg_type->cs_in, arg_type->c_type, arg_or_defval_local,
						String(), String(), String(), INDENT2);
			}
			if (arg_type->cs_in_expr.is_empty()) {
				icall_params += arg_or_defval_local;
			} else {
				icall_params += sformat(arg_type->cs_in_expr, arg_or_defval_local, arg_type->c_type);
			}
			
			String param_tag_name = iarg.name.begins_with("@") ? iarg.name.substr(1, iarg.name.length()) : iarg.name;
			
			String param_def_arg = def_arg.replacen("<", "&lt;").replacen(">", "&gt;");
			default_args_doc.append(MEMBER_BEGIN "/// <param name=\"" + param_tag_name + "\">If the parameter is null, then the default value is <c>" + param_def_arg + "</c>.</param>");
		} else {
			if (arg_type->cs_in.size()) {
				cs_in_statements << sformat(arg_type->cs_in, arg_type->c_type, iarg.name,
						String(), String(), String(), INDENT2);
			}
			icall_params += arg_type->cs_in_expr.is_empty() ? iarg.name : sformat(arg_type->cs_in_expr, iarg.name, arg_type->c_type);
		}
		cs_in_expr_is_unsafe |= arg_type->cs_in_expr_is_unsafe;
	}
	
	{
		if (!p_imethod.is_virtual && !p_imethod.requires_object_call) {
			p_output << MEMBER_BEGIN "[DebuggerBrowsable(DebuggerBrowsableState.Never)]\n"
					 << INDENT1 "private static readonly IntPtr " << method_bind_field << " = ";
			if (p_itype.is_singleton) {