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

<< "(object delegateObj, NativeVariantPtrArgs args, out godot_variant ret)\n"
					 << INDENT1 "{\n"
					 << INDENT2 "Callable.ThrowIfArgCountMismatch(args, " << itos(p_isignal.arguments.size()) << ");\n"
					 << INDENT2 "((" << delegate_name << ")delegateObj)(";
			int idx = 0;
			for (const ArgumentInterface &iarg : p_isignal.arguments) {
				const TypeInterface *arg_type = _get_type_or_null(iarg.type);
				ERR_FAIL_NULL_V(arg_type, ERR_BUG); 
				if (idx != 0) {
					p_output << ",";
				}
				p_output << sformat(arg_type->cs_variant_to_managed,
						"args[" + itos(idx) + "]", arg_type->cs_type, arg_type->name);
				idx++;
			}
			p_output << ");\n"
					 << INDENT2 "ret = default;\n"
					 << INDENT1 "}\n";
		}
		if (p_isignal.method_doc && p_isignal.method_doc->description.size()) {
			String xml_summary = bbcode_to_xml(fix_doc_description(p_isignal.method_doc->description), &p_itype);
			Vector<String> summary_lines = xml_summary.length() ? xml_summary.split("\n") : Vector<String>();
			if (summary_lines.size()) {
				p_output.append(MEMBER_BEGIN "/// <summary>\n");
				for (int i = 0; i < summary_lines.size(); i++) {
					p_output.append(INDENT1 "/// ");
					p_output.append(summary_lines[i]);
					p_output.append("\n");
				}
				p_output.append(INDENT1 "/// </summary>");