### Godot version

v4.0.beta16.official [518b9e580]

### System information

Windows 10

### Issue description

`RichTextLabel` with `threaded` enabled may crash the game or show the following warning if the node is in another scene:

```
W 0:00:03:0802   test.gd:12 @ load_with_scene(): A Thread object has been re-started without wait_to_finish() having been called on it. Please do so to ensure correct cleanup of the thread.
  <C++ Source>   core/os/thread.cpp:76 @ start()
  <Stack Trace>  test.gd:12 @ load_with_scene()
                 test.gd:6 @ load_items()
                 test.gd:26 @ _on_button_pressed()
```

It may crash the game (without any warning) if it's added directly.

In `v4.0.beta15.official [4fa6edc88]` I was able to reproduce the same warning on my project but I can't reproduce it in the attached MRP. I get a different error and will crash too if the node is added directly:

```
E 0:00:03:0019   remove_from_group: Condition "!E" is true.
  <C++ Source>   scene/main/scene_tree.cpp:157 @ remove_from_group()
```


### Steps to reproduce

Click on the  `Load with scene` or `Load with node` buttons in the attached MRP until it shows a warning/error or crashes. It may take a while.

### Minimal reproduction project

[add_chid_bug_b16.zip](https://github.com/godotengine/godot/files/10521402/add_chid_bug_b16.zip)

return line.get_height(theme_cache.line_separation);
}
void RichTextLabel::_update_theme_item_cache() {
	Control::_update_theme_item_cache();
	theme_cache.normal_style = get_theme_stylebox(SNAME("normal"));
	theme_cache.focus_style = get_theme_stylebox(SNAME("focus"));
	theme_cache.progress_bg_style = get_theme_stylebox(SNAME("background"), SNAME("ProgressBar"));
	theme_cache.progress_fg_style = get_theme_stylebox(SNAME("fill"), SNAME("ProgressBar"));
	theme_cache.line_separation = get_theme_constant(SNAME("line_separation"));
	theme_cache.normal_font = get_theme_font(SNAME("normal_font"));
	theme_cache.normal_font_size = get_theme_font_size(SNAME("normal_font_size"));
	theme_cache.default_color = get_theme_color(SNAME("default_color"));
	theme_cache.font_selected_color = get_theme_color(SNAME("font_selected_color"));
	use_selected_font_color = theme_cache.font_selected_color != Color(0, 0, 0, 0);
	theme_cache.selection_color = get_theme_color(SNAME("selection_color"));
	theme_cache.font_outline_color = get_theme_color(SNAME("font_outline_color"));
	theme_cache.font_shadow_color = get_theme_color(SNAME("font_shadow_color"));
	theme_cache.shadow_outline_size = get_theme_constant(SNAME("shadow_outline_size"));
	theme_cache.shadow_offset_x = get_theme_constant(SNAME("shadow_offset_x"));
	theme_cache.shadow_offset_y = get_theme_constant(SNAME("shadow_offset_y"));
	theme_cache.outline_size = get_theme_constant(SNAME("outline_size"));
	theme_cache.bold_font = get_theme_font(SNAME("bold_font"));
	theme_cache.bold_font_size = get_theme_font_size(SNAME("bold_font_size"));
	theme_cache.bold_italics_font = get_theme_font(SNAME("bold_italics_font"));
	theme_cache.bold_italics_font_size = get_theme_font_size(SNAME("bold_italics_font_size"));
	theme_cache.italics_font = get_theme_font(SNAME("italics_font"));
	theme_cache.italics_font_size = get_theme_font_size(SNAME("italics_font_size"));
	theme_cache.mono_font = get_theme_font(SNAME("mono_font"));