### Godot version

4.1 dev4

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description


https://github.com/godotengine/godot/assets/2223172/fe382ae2-04bb-4efa-b666-9e94ebb56a9c



### Steps to reproduce

1​. Go to Script Editor
2​. Toggle bookmark (Go To -> Toggle Bookmark)
3[.](https://media.tenor.com/_BiwWBWhYucAAAAd/what-huh.gif) It's not visible

### Minimal reproduction project

N/A
text_editor->begin_complex_operation();
	Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
	for (const int &c : caret_edit_order) {
		const int cursor_column = text_editor->get_caret_column(c);
		int from_line = text_editor->get_caret_line(c);
		int to_line = text_editor->get_caret_line(c);
		int from_column = 0;
		int to_column = 0;
		int cursor_new_line = to_line + 1;
		int cursor_new_column = text_editor->get_caret_column(c);
		String new_text = "\n" + text_editor->get_line(from_line);
		bool selection_active = false;
		text_editor->set_caret_column(text_editor->get_line(from_line).length(), c == 0, c);
		if (text_editor->has_selection(c)) {
			from_column = text_editor->get_selection_from_column(c);
			to_column = text_editor->get_selection_to_column(c);
			from_line = text_editor->get_selection_from_line(c);
			to_line = text_editor->get_selection_to_line(c);
			cursor_new_line = to_line + text_editor->get_caret_line(c) - from_line;
			cursor_new_column = to_column == cursor_column ? 2 * to_column - from_column : to_column;
			new_text = text_editor->get_selected_text(c);
			selection_active = true;
			text_editor->set_caret_line(to_line, c == 0, true, 0, c);
			text_editor->set_caret_column(to_column, c == 0, c);
		}