### Godot version

master ([06ccbfe](https://github.com/godotengine/godot/commit/06ccbfe8eec6e840db3df2360dc2804386f940b8))

### System information

PopOS 22.04

### Issue description

Sometimes the doc page is broken when the engine is closed and then restarted.
Closing the doc and opening it again fixes it.

![2023-05-27_22-15](https://github.com/godotengine/godot/assets/3624853/ed202a55-03e8-420a-bc1c-ccfc7f7cd02a)


### Steps to reproduce

- Open a documentation page for any node
- Restart Godot

### Minimal reproduction project

NA

EDIT : Added the commit hash @Calinou 
selection.from_item = nullptr;
								selection.from_char = 0;
								selection.to_frame = nullptr;
								selection.to_line = 0;
								selection.to_item = nullptr;
								selection.to_char = 0;
								deselect();
							}
						}
					}
				}
			} else if (b->is_pressed() && b->is_double_click() && selection.enabled) {
				
				ItemFrame *c_frame = nullptr;
				int c_line = 0;
				Item *c_item = nullptr;
				int c_index = 0;
				bool outside;
				selection.drag_attempt = false;
				_find_click(main, b->get_position(), &c_frame, &c_line, &c_item, &c_index, &outside, false);
				if (c_frame) {
					const Line &l = c_frame->lines[c_line];
					MutexLock lock(l.text_buf->get_mutex());
					PackedInt32Array words = TS->shaped_text_get_word_breaks(l.text_buf->get_rid());
					for (int i = 0; i < words.size(); i = i + 2) {
						if (c_index >= words[i] && c_index < words[i + 1]) {
							selection.from_frame = c_frame;
							selection.from_line = c_line;
							selection.from_item = c_item;
							selection.from_char = words[i];