### 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 
int fi = main->first_resized_line.load();
		float total_height = (fi == 0) ? 0 : _calculate_line_vertical_offset(main->lines[fi - 1]);
		for (int i = fi; i < (int)main->lines.size(); i++) {
			total_height = _resize_line(main, i, theme_cache.normal_font, theme_cache.normal_font_size, text_rect.get_size().width - scroll_w, total_height);
			updating_scroll = true;
			bool exceeds = total_height > ctrl_height && scroll_active;
			if (exceeds != scroll_visible) {
				if (exceeds) {
					scroll_visible = true;
					scroll_w = vscroll->get_combined_minimum_size().width;
					vscroll->show();
					vscroll->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -scroll_w);
				} else {
					scroll_visible = false;
					scroll_w = 0;
					vscroll->hide();
				}
				main->first_resized_line.store(0);
				total_height = 0;
				for (int j = 0; j <= i; j++) {
					total_height = _resize_line(main, j, theme_cache.normal_font, theme_cache.normal_font_size, text_rect.get_size().width - scroll_w, total_height);
					main->first_resized_line.store(j);
				}
			}
			vscroll->set_max(total_height);
			vscroll->set_page(text_rect.size.height);
			if (scroll_follow && scroll_following) {
				vscroll->set_value(total_height);
			} else {