### 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 
Item *it = p_frame;
	while (it) {
		ItemFX *ifx = nullptr;
		if (it->type == ITEM_CUSTOMFX || it->type == ITEM_SHAKE || it->type == ITEM_WAVE || it->type == ITEM_TORNADO || it->type == ITEM_RAINBOW) {
			ifx = static_cast<ItemFX *>(it);
		}
		if (!ifx) {
			it = _get_next_item(it, true);
			continue;
		}
		ifx->elapsed_time += p_delta_time;
		ItemShake *shake = nullptr;
		if (it->type == ITEM_SHAKE) {
			shake = static_cast<ItemShake *>(it);
		}
		if (shake) {
			bool cycle = (shake->elapsed_time > (1.0f / shake->rate));
			if (cycle) {
				shake->elapsed_time -= (1.0f / shake->rate);
				shake->reroll_random();
			}
		}
		it = _get_next_item(it, true);
	}
}
int RichTextLabel::_find_first_line(int p_from, int p_to, int p_vofs) const {