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

}
			c_args_var_content << sformat(arg_type->c_arg_in, c_param_name);
		}
		c_func_sig << ", " << arg_type->c_type_in << " " << c_param_name;
		i++;
	}
	String icall_method = p_icall.name;
	
	r_output << MEMBER_BEGIN "internal static unsafe " << (ret_void ? "void" : return_type->c_type_out) << " "
			 << icall_method << "(" << c_func_sig.as_string() << ") " OPEN_BLOCK;
	if (!ret_void && (!p_icall.is_vararg || return_type->cname != name_cache.type_Variant)) {
		String ptrcall_return_type;
		String initialization;
		if (return_type->is_object_type) {
			ptrcall_return_type = return_type->is_ref_counted ? "godot_ref" : return_type->c_type;
			initialization = " = default";
		} else {
			ptrcall_return_type = return_type->c_type;
		}
		r_output << INDENT2;
		if (return_type->is_ref_counted || return_type->c_type_is_disposable_struct) {
			r_output << "using ";
			if (initialization.is_empty()) {
				initialization = " = default";
			}
		} else if (return_type->c_ret_needs_default_initialization) {
			initialization = " = default";
		}
		r_output << ptrcall_return_type << " " C_LOCAL_RET << initialization << ";\n";
	}