### Godot version

Godot Engine v4.0.beta10.official.d0398f62f

### System information

Windows 10

### Issue description

Even though the syntax highlighting is correct, the following errors are raised, unless quotes are used.

`Expected node path as string or identifier after "$".`
`Invalid numeric notation.`
`Expected statement, found "Literal" instead.`

### Steps to reproduce

1. Add a node named "2D" to the scene
2. In a script, use `$2D`
3. The errors above are shown, even though the highlighting works fine

### Minimal reproduction project

[node-starts-with-number.zip](https://github.com/godotengine/godot/files/10332763/node-starts-with-number.zip)

if (in_string_name && (color_regions[in_region].start_key == "\"" || color_regions[in_region].start_key == "\'")) {
						region_color = string_name_color;
					}
					prev_color = region_color;
					highlighter_info["color"] = region_color;
					color_map[j] = highlighter_info;
					
					int region_end_index = -1;
					int end_key_length = color_regions[in_region].end_key.length();
					const char32_t *end_key = color_regions[in_region].end_key.get_data();
					for (; from < line_length; from++) {
						if (line_length - from < end_key_length) {
							
							if (str.find("\\", from) < 0) {
								break;
							}
						}
						if (!is_symbol(str[from])) {
							continue;
						}
						if (str[from] == '\\') {
							Dictionary escape_char_highlighter_info;
							escape_char_highlighter_info["color"] = symbol_color;
							color_map[from] = escape_char_highlighter_info;
							from++;
							Dictionary region_continue_highlighter_info;
							prev_color = region_color;
							region_continue_highlighter_info["color"] = region_color;
							color_map[from + 1] = region_continue_highlighter_info;
							continue;