### Godot version

4.2.dev.custom_build. 60f3b7967

### System information

Ubuntu 22.04 CI

### Issue description

When executing
```
extends Node
func _process(delta):
	for i in get_children():
		i.queue_free()

	var temp_variable16897 = RichTextLabel.new()
	add_child(temp_variable16897)
	temp_variable16897.get_content_width()
	temp_variable16897.push_list(12, -48, false, "127.0.0.1")
	temp_variable16897.newline()
	temp_variable16897.push_font(FontFile.new(), 79)
	temp_variable16897.push_outline_color(Color(73.4791259765625, -86.9401092529297, 58.615779876709, 1))
	temp_variable16897.push_indent(17)
	temp_variable16897.newline()
	temp_variable16897.get_line_offset(-78)
	temp_variable16897.remove_paragraph(4)
```
Godot crashes:
```
 ######################## Ending test ########################
ERROR: FATAL: Index p_index = 4 is out of bounds (count = 4).
   at: operator[] (./core/templates/local_vector.h:161)

================================================================
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v4.2.dev.custom_build (60f3b7967cbd00b4e1f52d33d372646f7bec02f6)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] ./godot.linuxbsd.editor.dev.x86_64.san(+0x3a6809cc) [0x557ca49b79cc] (/home/runner/work/Qarminer/Qarminer/godot/platform/linuxbsd/crash_handler_linuxbsd.cpp:57)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7faeaa185520] (??:0)
[3] LocalVector<RichTextLabel::Line, unsigned int, false, false>::operator[](unsigned int) (/home/runner/work/Qarminer/Qarminer/godot/./core/templates/local_vector.h:161 (discriminator 1))
[4] RichTextLabel::_validate_line_caches() (/home/runner/work/Qarminer/Qarminer/godot/scene/gui/rich_text_label.cpp:2862 (discriminator 1))
[5] RichTextLabel::_notification(int) (/home/runner/work/Qarminer/Qarminer/godot/scene/gui/rich_text_label.cpp:1842)
[6] RichTextLabel::_notificationv(int, bool) (/home/runner/work/Qarminer/Qarminer/godot/scene/gui/rich_text_label.h:41 (discriminator 14))
[7] Object::notification(int, bool) (/home/runner/work/Qarminer/Qarminer/godot/core/object/object.cpp:798)
[8] CanvasItem::_redraw_callback() (/home/runner/work/Qarminer/Qarminer/godot/scene/main/canvas_item.cpp:141)
[9] void call_with_variant_args_helper<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/runner/work/Qarminer/Qarminer/godot/./core/variant/binder_common.h:308 (discriminator 4))
[10] void call_with_variant_args<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, int, Callable::CallError&) (/home/runner/work/Qarminer/Qarminer/godot/./core/variant/binder_common.h:403)
[11] CallableCustomMethodPointer<CanvasItem>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/runner/work/Qarminer/Qarminer/godot/./core/object/callable_method_pointer.h:105)
[12] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/runner/work/Qarminer/Qarminer/godot/core/variant/callable.cpp:64)
[13] CallQueue::_call_function(Callable const&, Variant const*, int, bool) (/home/runner/work/Qarminer/Qarminer/godot/core/object/message_queue.cpp:220)
[14] CallQueue::flush() (/home/runner/work/Qarminer/Qarminer/godot/core/object/message_queue.cpp:322)
[15] SceneTree::process(double) (/home/runner/work/Qarminer/Qarminer/godot/scene/main/scene_tree.cpp:511 (discriminator 4))
[16] Main::iteration() (/home/runner/work/Qarminer/Qarminer/godot/main/main.cpp:3431)
[17] OS_LinuxBSD::run() (/home/runner/work/Qarminer/Qarminer/godot/platform/linuxbsd/os_linuxbsd.cpp:912)
[18] ./godot.linuxbsd.editor.dev.x86_64.san(main+0x58f) [0x557ca49b7378] (/home/runner/work/Qarminer/Qarminer/godot/platform/linuxbsd/godot_linuxbsd.cpp:76)
[19] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7faeaa16cd90] (??:0)
[20] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7faeaa16ce40] (??:0)
[21] ./godot.linuxbsd.editor.dev.x86_64.san(_start+0x25) [0x557ca49b6d25] (??:?)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)
```


This example was found by Godot fuzzer - [Qarminer](https://github.com/qarmin/Qarminer), so it is quite unlikelly that this code could be used in real project, but still this should be handled gracefully.

Memory leaks or asan backtraces are visibe when using Godot build with sanitizers support - https://github.com/qarmin/GodotBuilds/actions (linux -> linux-editor-sanitizers)


### Steps to reproduce

Above

### Minimal reproduction project

Above
Item *item = p_item;
	while (item) {
		if (item->type == ITEM_UNDERLINE) {
			return true;
		}
		item = item->parent;
	}
	return false;
}
bool RichTextLabel::_find_strikethrough(Item *p_item) {
	Item *item = p_item;
	while (item) {
		if (item->type == ITEM_STRIKETHROUGH) {
			return true;
		}
		item = item->parent;
	}
	return false;
}
void RichTextLabel::_fetch_item_fx_stack(Item *p_item, Vector<ItemFX *> &r_stack) {
	Item *item = p_item;
	while (item) {
		if (item->type == ITEM_CUSTOMFX || item->type == ITEM_SHAKE || item->type == ITEM_WAVE || item->type == ITEM_TORNADO || item->type == ITEM_RAINBOW || item->type == ITEM_PULSE) {
			r_stack.push_back(static_cast<ItemFX *>(item));
		}
		item = item->parent;
	}
}
void RichTextLabel::_normalize_subtags(Vector<String> &subtags) {