### 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 << INDENT1 "}\n";
		
		output << MEMBER_BEGIN "protected internal " << (is_derived_type ? "override" : "virtual")
			   << " bool " CS_METHOD_HAS_GODOT_CLASS_METHOD "(in godot_string_name method)\n"
			   << INDENT1 "{\n";
		for (const MethodInterface &imethod : itype.methods) {
			if (!imethod.is_virtual) {
				continue;
			}
			
			
			
			
			output << INDENT2 "if (method == MethodName." << imethod.proxy_name
				   << ")\n" INDENT2 "{\n"
				   << INDENT3 "if (" CS_METHOD_HAS_GODOT_CLASS_METHOD "("
				   << CS_STATIC_FIELD_METHOD_PROXY_NAME_PREFIX << imethod.name
				   << ".NativeValue.DangerousSelfRef))\n" INDENT3 "{\n"
				   << INDENT4 "return true;\n"
				   << INDENT3 "}\n" INDENT2 "}\n";
		}
		if (is_derived_type) {
			output << INDENT2 "return base." CS_METHOD_HAS_GODOT_CLASS_METHOD "(method);\n";
		} else {
			output << INDENT2 "return false;\n";
		}
		output << INDENT1 "}\n";
	}
	
	bool is_inherit = !itype.is_singleton && obj_types.has(itype.base_name);