### 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 
List<Item *>::Element *E = p_from;
	while (E != nullptr) {
		ERR_CONTINUE(E->get()->type != ITEM_FRAME); 
		ItemFrame *frame = static_cast<ItemFrame *>(E->get());
		if (p_reverse_search) {
			for (int i = (int)frame->lines.size() - 1; i >= 0; i--) {
				if (_search_line(frame, i, p_string, -1, p_reverse_search)) {
					return true;
				}
			}
		} else {
			for (int i = 0; i < (int)frame->lines.size(); i++) {
				if (_search_line(frame, i, p_string, 0, p_reverse_search)) {
					return true;
				}
			}
		}
		E = p_reverse_search ? E->prev() : E->next();
	}
	return false;
}
bool RichTextLabel::_search_line(ItemFrame *p_frame, int p_line, const String &p_string, int p_char_idx, bool p_reverse_search) {