### 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> strings;
	gdscript->get_string_delimiters(&strings);
	for (const String &string : strings) {
		String beg = string.get_slice(" ", 0);
		String end = string.get_slice_count(" ") > 1 ? string.get_slice(" ", 1) : String();
		add_color_region(beg, end, string_color, end.is_empty());
	}
	const Ref<Script> scr = _get_edited_resource();
	if (scr.is_valid()) {
		
		const Color member_variable_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
		StringName instance_base = scr->get_instance_base_type();
		if (instance_base != StringName()) {
			List<PropertyInfo> plist;
			ClassDB::get_property_list(instance_base, &plist);
			for (const PropertyInfo &E : plist) {
				String prop_name = E.name;
				if (E.usage & PROPERTY_USAGE_CATEGORY || E.usage & PROPERTY_USAGE_GROUP || E.usage & PROPERTY_USAGE_SUBGROUP) {
					continue;
				}
				if (prop_name.contains("/")) {
					continue;
				}
				member_keywords[prop_name] = member_variable_color;
			}
			List<String> clist;
			ClassDB::get_integer_constant_list(instance_base, &clist);
			for (const String &E : clist) {
				member_keywords[E] = member_variable_color;
			}