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

for (const EnumInterface &ienum : itype.enums) {
		ERR_FAIL_COND_V(ienum.constants.is_empty(), ERR_BUG);
		if (ienum.is_flags) {
			output.append(MEMBER_BEGIN "[System.Flags]");
		}
		output.append(MEMBER_BEGIN "public enum ");
		output.append(ienum.cname.operator String());
		output.append(" : long");
		output.append(MEMBER_BEGIN OPEN_BLOCK);
		const ConstantInterface &last = ienum.constants.back()->get();
		for (const ConstantInterface &iconstant : ienum.constants) {
			if (iconstant.const_doc && iconstant.const_doc->description.size()) {
				String xml_summary = bbcode_to_xml(fix_doc_description(iconstant.const_doc->description), &itype);
				Vector<String> summary_lines = xml_summary.length() ? xml_summary.split("\n") : Vector<String>();
				if (summary_lines.size()) {
					output.append(INDENT2 "/// <summary>\n");
					for (int i = 0; i < summary_lines.size(); i++) {
						output.append(INDENT2 "/// ");
						output.append(summary_lines[i]);
						output.append("\n");
					}
					output.append(INDENT2 "/// </summary>\n");
				}
			}
			output.append(INDENT2);
			output.append(iconstant.proxy_name);
			output.append(" = ");
			output.append(itos(iconstant.value));
			output.append(&iconstant != &last ? ",\n" : "\n");
		}