### 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
last_line = line;
			lines.append(line);
		}
	}
	for (const int &line : lines) {
		if (line != text_editor->get_line_count() - 1) {
			text_editor->remove_text(line, 0, line + 1, 0);
		} else {
			text_editor->remove_text(line - 1, text_editor->get_line(line - 1).length(), line, text_editor->get_line(line).length());
		}
		
		int new_line = MIN(line, text_editor->get_line_count() - 1);
		text_editor->unfold_line(new_line);
		for (const int &c : caret_edit_order) {
			if (text_editor->get_caret_line(c) == line || (text_editor->get_caret_line(c) == line + 1 && text_editor->get_caret_column(c) == 0)) {
				text_editor->deselect(c);
				text_editor->set_caret_line(new_line, c == 0, true, 0, c);
				continue;
			}
			if (text_editor->get_caret_line(c) > line) {
				text_editor->set_caret_line(text_editor->get_caret_line(c) - 1, c == 0, true, 0, c);
				continue;
			}
			break;
		}
	}
	text_editor->merge_overlapping_carets();
	text_editor->end_complex_operation();
}
void CodeTextEditor::duplicate_selection() {