### Godot version

4.0 dev_build

### System information

Ubuntu 22.04.1

### Issue description

The "Lookup Symbol" button don't appears for custorm class names.
Related issues: #68475,  #73167.
I tried apply #68311, #69473 and #73196. It don't helps.
The `Ctrl+LMB` works right for all cases.

### Steps to reproduce

Right click to the `CustomClassA` symbol in the `custom_class_b.gd` anywhere. The `Lookup Symbol` button don't appears in the context menu.

### Minimal reproduction project

Example from  #68475.
String word_at_pos = tx->get_word_at_pos(local_pos);
		if (word_at_pos.is_empty()) {
			word_at_pos = tx->get_word_under_caret(caret_clicked);
		}
		if (word_at_pos.is_empty()) {
			word_at_pos = tx->get_selected_text(caret_clicked);
		}
		bool has_color = (word_at_pos == "Color");
		bool foldable = tx->can_fold_line(row) || tx->is_line_folded(row);
		bool open_docs = false;
		bool goto_definition = false;
		if (word_at_pos.is_resource_file()) {
			open_docs = true;
		} else {
			Node *base = get_tree()->get_edited_scene_root();
			if (base) {
				base = _find_node_for_script(base, base, script);
			}
			ScriptLanguage::LookupResult result;
			if (script->get_language()->lookup_code(tx->get_text_for_symbol_lookup(), word_at_pos, script->get_path(), base, result) == OK) {
				open_docs = true;
			}
		}
		if (has_color) {
			String line = tx->get_line(row);
			color_position.x = row;
			color_position.y = col;
			int begin = -1;
			int end = -1;
			enum EXPRESSION_PATTERNS {