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

Error save_err = _save_file(output_file, extensions_source);
		if (save_err != OK) {
			return save_err;
		}
		compile_items.push_back(output_file);
	}
	for (const KeyValue<StringName, TypeInterface> &E : obj_types) {
		const TypeInterface &itype = E.value;
		if (itype.api_type == ClassDB::API_EDITOR) {
			continue;
		}
		String output_file = path::join(godot_objects_gen_dir, itype.proxy_name + ".cs");
		Error err = _generate_cs_type(itype, output_file);
		if (err == ERR_SKIP) {
			continue;
		}
		if (err != OK) {
			return err;
		}
		compile_items.push_back(output_file);
	}
	
	StringBuilder cs_icalls_content;
	cs_icalls_content.append("namespace " BINDINGS_NAMESPACE ";\n\n");
	cs_icalls_content.append("using System;\n"
							 "using System.Diagnostics.CodeAnalysis;\n"
							 "using System.Runtime.InteropServices;\n"
							 "using Godot.NativeInterop;\n"
							 "\n");
	cs_icalls_content.append("[SuppressMessage(\"ReSharper\", \"InconsistentNaming\")]\n");