### 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 (end_key_length == 0 || color_regions[c].line_only || from + end_key_length > line_length) {
							if (from + end_key_length > line_length) {
								
								if (str.find("\\", from) >= 0) {
									break;
								}
							}
							prev_color = color_regions[in_region].color;
							highlighter_info["color"] = color_regions[c].color;
							color_map[j] = highlighter_info;
							j = line_length;
							if (!color_regions[c].line_only) {
								color_region_cache[p_line] = c;
							}
						}
						break;
					}
					if (j == line_length) {
						continue;
					}
				}
				
				if (in_region != -1) {
					Color region_color = color_regions[in_region].color;
					if (in_node_path && (color_regions[in_region].start_key == "\"" || color_regions[in_region].start_key == "\'")) {
						region_color = node_path_color;
					}
					if (in_node_ref && (color_regions[in_region].start_key == "\"" || color_regions[in_region].start_key == "\'")) {
						region_color = node_ref_color;
					}