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

List<String> keyword_list;
	gdscript->get_reserved_words(&keyword_list);
	for (const String &E : keyword_list) {
		if (gdscript->is_control_flow_keyword(E)) {
			reserved_keywords[StringName(E)] = control_flow_keyword_color;
		} else {
			reserved_keywords[StringName(E)] = keyword_color;
		}
	}
	
	List<StringName> global_function_list;
	GDScriptUtilityFunctions::get_function_list(&global_function_list);
	Variant::get_utility_function_list(&global_function_list);
	
	global_functions.insert(SNAME("assert"));
	global_functions.insert(SNAME("preload"));
	for (const StringName &E : global_function_list) {
		global_functions.insert(E);
	}
	
	const Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
	List<String> comments;
	gdscript->get_comment_delimiters(&comments);
	for (const String &comment : comments) {
		String beg = comment.get_slice(" ", 0);
		String end = comment.get_slice_count(" ") > 1 ? comment.get_slice(" ", 1) : String();
		add_color_region(beg, end, comment_color, end.is_empty());
	}
	
	const Color string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");