### Godot version

v4.0.beta.custom_build [cc89fcbd0]

### System information

Linux (Ubuntu 22.04), Vulkan, Radeon RX Vega 64 (eGPU)

### Issue description

The text editor doesn't register in the navigation history the local navigation.

In a large file, the user can CTRL+click on definitions of the same file to navigate quickly to a function or a class in the opened script. When the user clicks on the previous or next buttons, that local navigation seems to be not considered.

See this video for a recreation of the issue:

[Capture vidéo du 2023-01-15 17:57:45.webm](https://user-images.githubusercontent.com/270928/212571752-d05c5d85-cc7f-434b-b020-316f6194ad13.webm)


### Steps to reproduce

1. Open the MRP;
2. Open `main.gd`;
3. CTRL+click on `test()` in `_ready()`;
4. CTRL+click on `Inner` in `test()`;
5. Press on the previous button (or the previous button on your mouse);
6. See that the navigation wasn't registered in the history.

### Minimal reproduction project

[history_local.zip](https://github.com/godotengine/godot/files/10421462/history_local.zip)

}
	Node *cur_node = tab_container->get_tab_control(tab_container->get_current_tab());
	HBoxContainer *drag_preview = memnew(HBoxContainer);
	String preview_name = "";
	Ref<Texture2D> preview_icon;
	ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(cur_node);
	if (se) {
		preview_name = se->get_name();
		preview_icon = se->get_theme_icon();
	}
	EditorHelp *eh = Object::cast_to<EditorHelp>(cur_node);
	if (eh) {
		preview_name = eh->get_class();
		preview_icon = get_theme_icon(SNAME("Help"), SNAME("EditorIcons"));
	}
	if (!preview_icon.is_null()) {
		TextureRect *tf = memnew(TextureRect);
		tf->set_texture(preview_icon);
		tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
		drag_preview->add_child(tf);
	}
	Label *label = memnew(Label(preview_name));
	drag_preview->add_child(label);
	set_drag_preview(drag_preview);
	Dictionary drag_data;
	drag_data["type"] = "script_list_element"; 
	drag_data["script_list_element"] = cur_node;
	return drag_data;
}
bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {