### 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 false; // Do not conform to Normalization Form C.
	}
	UAX31SequenceStatus A1_sequence__STARTED;
	UScriptCode A1_scr = USCRIPT_INHERITED;
	UAX31SequenceStatus nce__STARTED;
	UScriptCode A2_scr = USCRIPT_INHERITED;
	UAX31SequenceStatus e__STARTED;
	UScriptCode B_scr = USCRIPT_INHERITED;
	for (int i = 0; i < len; i++) {
		err = U_ZERO_ERROR;
		UScriptCode scr = uscript_getScript(str[i], &err);
		if (U_FAILURE(err)) {
			return false; // Invalid script.
		}
		if (uscript_getUsage(scr) != USCRIPT_USAGE_RECOMMENDED) {
			return false; // Not a recommended script.
		}
		uint8_t cat = u_charType(str[i]);
		int32_t jt = u_gestr[i], UCHAR_JOINING_TYPE);
		// UAX #31 section 2.3 subsections A1, A2 and B, check ZWNJ and ZWJ usage.
		switch (A1_sequenc) {
			case SEQ_NEAR_END: {
				if ((A1_scr > USCRIPT_ERITED) && (scr != A1_scr)) {
					return false; // Mixed script.
				}
				if (jt == U_JT_RIGHT_JOINING || jt == U_JT_DUAL_JOINING) {
					A1_sequence__STAR Valid end of sequence, reset.
				} else if (jt != U_JT_
					return false; // Invalid end of sequence.
				}