### 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)

ItemTornado *item_tornado = static_cast<ItemTornado *>(item_fx);
					if (!cn) {
						double torn_x = Math::sin(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + gloff.x) / 50)) * (item_tornado->radius);
						double torn_y = Math::cos(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + gloff.x) / 50)) * (item_tornado->radius);
						item_tornado->prev_off = Point2(torn_x, torn_y);
					}
					fx_offset += item_tornado->prev_off;
				} else if (item_fx->type == ITEM_RAINBOW) {
					ItemRainbow *item_rainbow = static_cast<ItemRainbow *>(item_fx);
					font_color = font_color.from_hsv(item_rainbow->frequency * (item_rainbow->elapsed_time + ((p_ofs.x + gloff.x) / 50)), item_rainbow->saturation, item_rainbow->value, font_color.a);
				}
			}
			
			const Color modulated_outline_color = font_outline_color * Color(1, 1, 1, font_color.a);
			const Color modulated_shadow_color = font_shadow_color * Color(1, 1, 1, font_color.a);
			for (int j = 0; j < glyphs[i].repeat; j++) {
				if (txt_visible) {
					bool skip = (trim_chars && l.char_offset + glyphs[i].end > visible_characters) || (trim_glyphs_ltr && (processed_glyphs_ol >= visible_glyphs)) || (trim_glyphs_rtl && (processed_glyphs_ol < total_glyphs - visible_glyphs));
					if (!skip && frid != RID()) {
						if (modulated_shadow_color.a > 0) {
							TS->font_draw_glyph(frid, ci, glyphs[i].font_size, p_ofs + fx_offset + gloff + p_shadow_ofs, gl, modulated_shadow_color);
						}
						if (modulated_shadow_color.a > 0 && p_shadow_outline_size > 0) {
							TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, p_shadow_outline_size, p_ofs + fx_offset + gloff + p_shadow_ofs, gl, modulated_shadow_color);
						}
						if (modulated_outline_color.a != 0.0 && size > 0) {
							TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, size, p_ofs + fx_offset + gloff, gl, modulated_outline_color);
						}
					}
					processed_glyphs_ol++;