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

in_string_name = false;
		}
		
		if (!in_node_path && in_region == -1 && str[j] == '^' && !is_binary_op && (j == 0 || (j > 0 && str[j - 1] != '^') || prev_is_binary_op)) {
			in_node_path = true;
		} else if (in_region != -1 || is_a_symbol) {
			in_node_path = false;
		}
		if (!in_node_ref && in_region == -1 && (str[j] == '$' || (str[j] == '%' && !is_binary_op))) {
			in_node_ref = true;
		} else if (in_region != -1 || (is_a_symbol && str[j] != '/' && str[j] != '%')) {
			in_node_ref = false;
		}
		if (!in_annotation && in_region == -1 && str[j] == '@') {
			in_annotation = true;
		} else if (in_region != -1 || is_a_symbol) {
			in_annotation = false;
		}
		if (in_node_ref) {
			next_type = NODE_REF;
			color = node_ref_color;
		} else if (in_annotation) {
			next_type = ANNOTATION;
			color = annotation_color;
		} else if (in_string_name) {
			next_type = STRING_NAME;
			color = string_name_color;
		} else if (in_node_path) {
			next_type = NODE_PATH;
			color = node_path_color;