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

INSERT_STRUCT_TYPE(Projection)
#undef INSERT_STRUCT_TYPE
	
	itype = TypeInterface::create_value_type(String("bool"));
	itype.cs_in_expr = "%0.ToGodotBool()";
	itype.cs_out = "%5return %0(%1).ToBool();";
	itype.c_type = "godot_bool";
	itype.c_type_in = itype.c_type;
	itype.c_type_out = itype.c_type;
	itype.c_arg_in = "&%s";
	itype.c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromBool(%1);\n";
	builtin_types.insert(itype.cname, itype);
	
	{
		
		
#define INSERT_INT_TYPE(m_name, m_int_struct_name)                                             \
	{                                                                                          \
		itype = TypeInterface::create_value_type(String(m_name));                              \
		if (itype.name != "long" && itype.name != "ulong") {                                   \
			itype.c_in = "%5%0 %1_in = %1;\n";                                                 \
			itype.c_out = "%5return (%0)%1;\n";                                                \
			itype.c_type = "long";                                                             \
			itype.c_arg_in = "&%s_in";                                                         \
		} else {                                                                               \
			itype.c_arg_in = "&%s";                                                            \
		}                                                                                      \
		itype.c_type_in = itype.name;                                                          \
		itype.c_type_out = itype.name;                                                         \
		itype.c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromInt(%1);\n"; \