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

for (int i = 0; i < lines.size(); i++) {
						if (i != 0) {
							xml_output.append("<para>");
						}
						xml_output.append(lines[i].xml_escape());
						if (i != lines.size() - 1) {
							xml_output.append("</para>\n");
						}
					}
				}
			}
		}
		if (brk_pos == bbcode.length()) {
			break; 
		}
		int brk_end = bbcode.find("]", brk_pos + 1);
		if (brk_end == -1) {
			if (!line_del) {
				String text = bbcode.substr(brk_pos, bbcode.length() - brk_pos);
				if (code_tag || tag_stack.size() > 0) {
					xml_output.append(text.xml_escape());
				} else {
					Vector<String> lines = text.split("\n");
					for (int i = 0; i < lines.size(); i++) {
						if (i != 0) {
							xml_output.append("<para>");
						}
						xml_output.append(lines[i].xml_escape());
						if (i != lines.size() - 1) {
							xml_output.append("</para>\n");