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

arguments_sig += " = null";
				} else {
					arguments_sig += " = " + sformat(iarg.default_argument, arg_type->cs_type);
				}
			}
		}
		icall_params += ", ";
		if (iarg.default_argument.size() && iarg.def_param_mode != ArgumentInterface::CONSTANT) {
			
			
			String arg_or_defval_local = iarg.name;
			arg_or_defval_local += "OrDefVal";
			cs_in_statements << INDENT2 << arg_cs_type << " " << arg_or_defval_local << " = " << iarg.name;
			if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL) {
				cs_in_statements << ".HasValue ? ";
			} else {
				cs_in_statements << " != null ? ";
			}
			cs_in_statements << iarg.name;
			if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL) {
				cs_in_statements << ".Value : ";
			} else {
				cs_in_statements << " : ";
			}
			String cs_type = arg_cs_type;
			if (cs_type.ends_with("[]")) {
				cs_type = cs_type.substr(0, cs_type.length() - 2);
			}
			String def_arg = sformat(iarg.default_argument, cs_type);
			cs_in_statements << def_arg << ";\n";