Repository: godot
Issue: Error ( !is_inside_tree() ) when opening a scene file with CPUParticles3D
Labels: bug,topic:editor,needs testing,topic:particles

### Tested versions

- Reproducible in 4.3 official (and debug)

### System information

Windows 10

### Issue description

I started getting log spam. 

My scene contains another subscene with CPUParticleSystem as a root. It is enabled and it is in the global space. It only occurs if I have set "editable children" and it occurs during both the instantiate() call of the scene and editor load of the scene.

I traced it using the debug editor and it seems that instantiation sets the particle system `enable `to `true `before the node has settled in the tree, causing an update to run and in turn causing the global space call to fail. This is a hypothesis.

The corresponding stack trace:
```
godot.windows.editor.x86_64.exe!Node3D::get_global_transform() Line 345
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\scene\3d\node_3d.cpp(345)
godot.windows.editor.x86_64.exe!CPUParticles3D::_particles_process(double p_delta) Line 679
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\scene\3d\cpu_particles_3d.cpp(679)
godot.windows.editor.x86_64.exe!CPUParticles3D::_update_internal() Line 653
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\scene\3d\cpu_particles_3d.cpp(653)
[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args_helper(CPUParticles3D *) Line 304
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\core\variant\binder_common.h(304)
[Inline Frame] godot.windows.editor.x86_64.exe!call_with_variant_args_dv(CPUParticles3D *) Line 451
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\core\variant\binder_common.h(451)
godot.windows.editor.x86_64.exe!MethodBindT<CPUParticles3D,bool>::call(Object * p_object, const Variant * * p_args, int p_arg_count, Callable::CallError & r_error) Line 343
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\core\object\method_bind.h(343)
godot.windows.editor.x86_64.exe!ClassDB::set_property(Object * p_object, const StringName & p_property, const Variant & p_value, bool * r_valid) Line 1516
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\core\object\class_db.cpp(1516)
godot.windows.editor.x86_64.exe!Object::set(const StringName & p_name, const Variant & p_value, bool * r_valid) Line 249
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\core\object\object.cpp(249)
godot.windows.editor.x86_64.exe!SceneState::instantiate(SceneState::GenEditState p_edit_state) Line 420
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\scene\resources\packed_scene.cpp(420)
godot.windows.editor.x86_64.exe!PackedScene::instantiate(PackedScene::GenEditState p_edit_state) Line 2093
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\scene\resources\packed_scene.cpp(2093)
godot.windows.editor.x86_64.exe!EditorNode::load_scene(const String & p_scene, bool p_ignore_broken_deps, bool p_set_inherited, bool p_clear_errors, bool p_force_open_imported, bool p_silent_change_tab) Line 4080
	at C:\Users\hugol\AppData\Local\Temp\godot-debug-build-editor\editor\editor_node.cpp(4080)

```
Note that the "set" is the `enable` to `true` and likely we should skip _update_internal() if we're not in the tree:
https://github.com/godotengine/godot/blob/77dcf97d82cbfe4e4615475fa52ca03da645dbd8/scene/3d/cpu_particles_3d.cpp#L679

Possibly related issue on Godot 3.x
https://github.com/godotengine/godot/issues/47020 

### Steps to reproduce

1. open the attached project. navigate to assets/rocket/rockets/rocket_t4_cyan.tscn
2. Observe the error message in the output

Note that I just copied the relevant bits of the project that exhibit the problem since I am unable to produce a file that has it manually. It might be some .tscn file corruption if the above is the intended behavior.

### Minimal reproduction project (MRP)

[cpuparticleproblem.zip](https://github.com/user-attachments/files/17293485/cpuparticleproblem.zip)