### 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 (is_inherit) {
		output << MEMBER_BEGIN "public new class PropertyName : " << obj_types[itype.base_name].proxy_name << ".PropertyName";
	} else {
		output << MEMBER_BEGIN "public class PropertyName";
	}
	output << "\n"
		   << INDENT1 "{\n";
	for (const PropertyInterface &iprop : itype.properties) {
		output << INDENT2 "public static readonly StringName " << iprop.proxy_name << " = \"" << iprop.cname << "\";\n";
	}
	output << INDENT1 "}\n";
	
	if (is_inherit) {
		output << MEMBER_BEGIN "public new class MethodName : " << obj_types[itype.base_name].proxy_name << ".MethodName";
	} else {
		output << MEMBER_BEGIN "public class MethodName";
	}
	output << "\n"
		   << INDENT1 "{\n";
	for (const MethodInterface &imethod : itype.methods) {
		output << INDENT2 "public static readonly StringName " << imethod.proxy_name << " = \"" << imethod.cname << "\";\n";
	}
	output << INDENT1 "}\n";
	
	if (is_inherit) {
		output << MEMBER_BEGIN "public new class SignalName : " << obj_types[itype.base_name].proxy_name << ".SignalName";
	} else {
		output << MEMBER_BEGIN "public class SignalName";
	}