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

PropertyInfo return_info = method_info.return_val;
			MethodBind *m = imethod.is_virtual ? nullptr : ClassDB::get_method(type_cname, method_info.name);
			imethod.is_vararg = m && m->is_vararg();
			if (!m && !imethod.is_virtual) {
				ERR_FAIL_COND_V_MSG(!virtual_method_list.find(method_info), false,
						"Missing MethodBind for non-virtual method: '" + itype.name + "." + imethod.name + "'.");
				
				
				imethod.requires_object_call = true;
				
				
				
				imethod.return_type.cname = name_cache.type_void;
				
				
				if (itype.cname != name_cache.type_Object || imethod.name != "free") {
					WARN_PRINT("Notification: New unexpected virtual non-overridable method found."
							   " We only expected Object.free, but found '" +
							itype.name + "." + imethod.name + "'.");
				}
			} else if (return_info.type == Variant::INT && return_info.usage & (PROPERTY_USAGE_CLASS_IS_ENUM | PROPERTY_USAGE_CLASS_IS_BITFIELD)) {
				imethod.return_type.cname = return_info.class_name;
				imethod.return_type.is_enum = true;
			} else if (return_info.class_name != StringName()) {
				imethod.return_type.cname = return_info.class_name;
				bool bad_reference_hint = !imethod.is_virtual && return_info.hint != PROPERTY_HINT_RESOURCE_TYPE &&
						ClassDB::is_parent_class(return_info.class_name, name_cache.type_RefCounted);
				ERR_FAIL_COND_V_MSG(bad_reference_hint, false,
						String() + "Return type is reference but hint is not '" _STR(PROPERTY_HINT_RESOURCE_TYPE) "'." +
								" Are you returning a reference type by pointer? Method: '" + itype.name + "." + imethod.name + "'.");