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

output << ", ";
				}
				if (arg_type->cname == name_cache.type_Array_generic || arg_type->cname == name_cache.type_Dictionary_generic) {
					String arg_cs_type = arg_type->cs_type + _get_generic_type_parameters(*arg_type, iarg.type.generic_type_parameters);
					output << "new " << arg_cs_type << "(" << sformat(arg_type->cs_variant_to_managed, "args[" + itos(i) + "]", arg_type->cs_type, arg_type->name) << ")";
				} else {
					output << sformat(arg_type->cs_variant_to_managed,
							"args[" + itos(i) + "]", arg_type->cs_type, arg_type->name);
				}
			}
			output << ");\n";
			if (imethod.return_type.cname != name_cache.type_void) {
				const TypeInterface *return_type = _get_type_or_null(imethod.return_type);
				ERR_FAIL_NULL_V(return_type, ERR_BUG); 
				output << INDENT3 "ret = "
					   << sformat(return_type->cs_managed_to_variant, "callRet", return_type->cs_type, return_type->name)
					   << ";\n"
					   << INDENT3 "return true;\n";
			} else {
				output << INDENT3 "ret = default;\n"
					   << INDENT3 "return true;\n";
			}
			output << INDENT2 "}\n";
		}
		if (is_derived_type) {
			output << INDENT2 "return base." CS_METHOD_INVOKE_GODOT_CLASS_METHOD "(method, args, out ret);\n";
		} else {
			output << INDENT2 "ret = default;\n"
				   << INDENT2 "return false;\n";
		}