### Godot version

4.0.2

### System information

Ubuntu 22.04.1 LTS

### Issue description

So far I've found these ones:

![Screenshot from 2023-05-10 17-56-42](https://github.com/godotengine/godot/assets/85438892/b161b14a-cb7d-46fe-8398-816bf354a929)
![Screenshot from 2023-05-10 18-01-02](https://github.com/godotengine/godot/assets/85438892/b0fefcfb-4246-4ebb-ae7b-dd798d7a1d63)

But there are likely more like them. They are invalid, at least in the context I encountered them here (at the beginning of a regular line of script)

### Steps to reproduce

Type `Anchor` in the code editor.

### Minimal reproduction project

N/A
if (!ClassDB::get_integer_constant_enum(p_class, p_enum_constant)) {
		return ScriptLanguage::LOCATION_OTHER;
	}
	int depth = 0;
	StringName class_test = p_class;
	while (class_test && !ClassDB::get_integer_constant_enum(class_test, p_enum_constant, true)) {
		class_test = ClassDB::get_parent_class(class_test);
		depth++;
	}
	return depth | ScriptLanguage::LOCATION_PARENT_MASK;
}
static String _trim_parent_class(const String &p_class, const String &p_base_class) {
	if (p_base_class.is_empty()) {
		return p_class;
	}
	Vector<String> names = p_class.split(".", false, 1);
	if (names.size() == 2) {
		String first = names[0];
		String rest = names[1];
		if (ClassDB::class_exists(p_base_class) && ClassDB::class_exists(first) && ClassDB::is_parent_class(p_base_class, first)) {
			return rest;
		}
	}
	return p_class;
}
static String _get_visual_datatype(const PropertyInfo &p_info, bool p_is_arg, const String &p_base_class = "") {