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

if (p_arg_type.name == name_cache.type_Variant) {
		
		return true;
	}
	switch (p_val.get_type()) {
		case Variant::NIL:
			return p_arg_type.is_object_type ||
					name_cache.is_nullable_type(p_arg_type.name);
		case Variant::BOOL:
			return p_arg_type.name == name_cache.type_bool;
		case Variant::INT:
			return p_arg_type.name == name_cache.type_sbyte ||
					p_arg_type.name == name_cache.type_short ||
					p_arg_type.name == name_cache.type_int ||
					p_arg_type.name == name_cache.type_byte ||
					p_arg_type.name == name_cache.type_ushort ||
					p_arg_type.name == name_cache.type_uint ||
					p_arg_type.name == name_cache.type_long ||
					p_arg_type.name == name_cache.type_ulong ||
					p_arg_type.name == name_cache.type_float ||
					p_arg_type.name == name_cache.type_double ||
					p_arg_type.is_enum;
		case Variant::FLOAT:
			return p_arg_type.name == name_cache.type_float ||
					p_arg_type.name == name_cache.type_double;
		case Variant::STRING:
		case Variant::STRING_NAME:
			return p_arg_type.name == name_cache.type_String ||