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

p_output.append("namespace " BINDINGS_NAMESPACE ";\n\n");
	p_output.append("using System;\n\n");
	
	p_output.append("public static partial class " BINDINGS_GLOBAL_SCOPE_CLASS "\n{");
#define ARRAY_IS_EMPTY(m_type)                                                                          \
	p_output.append("\n" INDENT1 "/// <summary>\n");                                                    \
	p_output.append(INDENT1 "/// Returns true if this " #m_type " array is empty or doesn't exist.\n"); \
	p_output.append(INDENT1 "/// </summary>\n");                                                        \
	p_output.append(INDENT1 "/// <param name=\"instance\">The " #m_type " array check.</param>\n");     \
	p_output.append(INDENT1 "/// <returns>Whether or not the array is empty.</returns>\n");             \
	p_output.append(INDENT1 "public static bool IsEmpty(this " #m_type "[] instance)\n");               \
	p_output.append(OPEN_BLOCK_L1);                                                                     \
	p_output.append(INDENT2 "return instance == null || instance.Length == 0;\n");                      \
	p_output.append(INDENT1 CLOSE_BLOCK);
#define ARRAY_JOIN(m_type)                                                                                          \
	p_output.append("\n" INDENT1 "/// <summary>\n");                                                                \
	p_output.append(INDENT1 "/// Converts this " #m_type " array to a string delimited by the given string.\n");    \
	p_output.append(INDENT1 "/// </summary>\n");                                                                    \
	p_output.append(INDENT1 "/// <param name=\"instance\">The " #m_type " array to convert.</param>\n");            \
	p_output.append(INDENT1 "/// <param name=\"delimiter\">The delimiter to use between items.</param>\n");         \
	p_output.append(INDENT1 "/// <returns>A single string with all items.</returns>\n");                            \
	p_output.append(INDENT1 "public static string Join(this " #m_type "[] instance, string delimiter = \", \")\n"); \
	p_output.append(OPEN_BLOCK_L1);                                                                                 \
	p_output.append(INDENT2 "return String.Join(delimiter, instance);\n");                                          \
	p_output.append(INDENT1 CLOSE_BLOCK);
#define ARRAY_STRINGIFY(m_type)                                                                          \
	p_output.append("\n" INDENT1 "/// <summary>\n");                                                     \
	p_output.append(INDENT1 "/// Converts this " #m_type " array to a string with brackets.\n");         \
	p_output.append(INDENT1 "/// </summary>\n");                                                         \