### 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 (itype.class_doc) {
				for (int i = 0; i < itype.class_doc->methods.size(); i++) {
					if (itype.class_doc->methods[i].name == imethod.name) {
						imethod.method_doc = &itype.class_doc->methods[i];
						break;
					}
				}
			}
			ERR_FAIL_COND_V_MSG(itype.find_property_by_name(imethod.cname), false,
					"Method name conflicts with property: '" + itype.name + "." + imethod.name + "'.");
			
			if (!imethod.is_virtual && imethod.name[0] == '_') {
				for (const PropertyInterface &iprop : itype.properties) {
					if (iprop.setter == imethod.name || iprop.getter == imethod.name) {
						imethod.is_internal = true;
						itype.methods.push_back(imethod);
						break;
					}
				}
			} else {
				itype.methods.push_back(imethod);
			}
		}
		
		const HashMap<StringName, MethodInfo> &signal_map = class_info->signal_map;
		for (const KeyValue<StringName, MethodInfo> &E : signal_map) {
			SignalInterface isignal;
			const MethodInfo &method_info = E.value;
			isignal.name = method_info.name;
			isignal.cname = method_info.name;