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

obj_types.clear();
	List<StringName> class_list;
	ClassDB::get_class_list(&class_list);
	class_list.sort_custom<StringName::AlphCompare>();
	while (class_list.size()) {
		StringName type_cname = class_list.front()->get();
		ClassDB::APIType api_type = ClassDB::get_api_type(type_cname);
		if (api_type == ClassDB::API_NONE) {
			class_list.pop_front();
			continue;
		}
		if (ignored_types.has(type_cname)) {
			_log("Ignoring type '%s' because it's in the list of ignored types\n", String(type_cname).utf8().get_data());
			class_list.pop_front();
			continue;
		}
		if (!ClassDB::is_class_exposed(type_cname)) {
			_log("Ignoring type '%s' because it's not exposed\n", String(type_cname).utf8().get_data());
			class_list.pop_front();
			continue;
		}
		if (!ClassDB::is_class_enabled(type_cname)) {
			_log("Ignoring type '%s' because it's not enabled\n", String(type_cname).utf8().get_data());
			class_list.pop_front();
			continue;
		}
		ClassDB::ClassInfo *class_info = ClassDB::classes.getptr(type_cname);
		TypeInterface itype = TypeInterface::create_object_type(type_cname, api_type);