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

itype.c_type = itype.proxy_name;
	itype.c_type_in = itype.c_type;
	itype.c_type_out = itype.c_type;
	builtin_types.insert(itype.cname, itype);
}
void BindingsGenerator::_populate_global_constants() {
	int global_constants_count = CoreConstants::get_global_constant_count();
	if (global_constants_count > 0) {
		HashMap<String, DocData::ClassDoc>::Iterator match = EditorHelp::get_doc_data()->class_list.find("@GlobalScope");
		CRASH_COND_MSG(!match, "Could not find '@GlobalScope' in DocData.");
		const DocData::ClassDoc &global_scope_doc = match->value;
		for (int i = 0; i < global_constants_count; i++) {
			String constant_name = CoreConstants::get_global_constant_name(i);
			const DocData::ConstantDoc *const_doc = nullptr;
			for (int j = 0; j < global_scope_doc.constants.size(); j++) {
				const DocData::ConstantDoc &curr_const_doc = global_scope_doc.constants[j];
				if (curr_const_doc.name == constant_name) {
					const_doc = &curr_const_doc;
					break;
				}
			}
			int64_t constant_value = CoreConstants::get_global_constant_value(i);
			StringName enum_name = CoreConstants::get_global_constant_enum(i);
			ConstantInterface iconstant(constant_name, snake_to_pascal_case(constant_name, true), constant_value);
			iconstant.const_doc = const_doc;
			if (enum_name != StringName()) {
				EnumInterface ienum(enum_name);
				ienum.is_flags = CoreConstants::is_global_constant_bitfield(i);
				List<EnumInterface>::Element *enum_match = global_enums.find(ienum);
				if (enum_match) {