### 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 << MEMBER_BEGIN "protected internal " << (is_derived_type ? "override" : "virtual")
			   << " bool " CS_METHOD_INVOKE_GODOT_CLASS_METHOD "(in godot_string_name method, "
			   << "NativeVariantPtrArgs args, out godot_variant ret)\n"
			   << INDENT1 "{\n";
		for (const MethodInterface &imethod : itype.methods) {
			if (!imethod.is_virtual) {
				continue;
			}
			
			
			
			
			
			output << INDENT2 "if ((method == " << CS_STATIC_FIELD_METHOD_PROXY_NAME_PREFIX << imethod.name
				   << " || method == MethodName." << imethod.proxy_name
				   << ") && args.Count == " << itos(imethod.arguments.size())
				   << " && " << CS_METHOD_HAS_GODOT_CLASS_METHOD << "((godot_string_name)"
				   << CS_STATIC_FIELD_METHOD_PROXY_NAME_PREFIX << imethod.name << ".NativeValue))\n"
				   << INDENT2 "{\n";
			if (imethod.return_type.cname != name_cache.type_void) {
				output << INDENT3 "var callRet = ";
			} else {
				output << INDENT3;
			}
			output << imethod.proxy_name << "(";
			for (int i = 0; i < imethod.arguments.size(); i++) {
				const ArgumentInterface &iarg = imethod.arguments[i];
				const TypeInterface *arg_type = _get_type_or_null(iarg.type);
				ERR_FAIL_NULL_V(arg_type, ERR_BUG); 
				if (i != 0) {