### Godot version

4.2.rc 7022271

### System information

Godot v4.2.rc (702227129) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3090 (NVIDIA; 31.0.15.3713) - Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 Threads)

### Issue description

Godot crashes due to a complicated chain of events in the stack trace involving `reimport_files`, `reload_scene` and a synchronous `clear_history` which memdeletes several dangling TrackCache pointers in this RefCounted AnimatedValuesBackup ?!

```
Critical error detected c0000374
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in godot.windows.editor.x86_64.exe.
```
![image](https://github.com/godotengine/godot/assets/39946030/90bdec00-d116-44c3-9eb6-1d80969dd92a)

Something feels very wrong about holding raw pointers to an AnimationMixer TrackCache in AnimatedValuesBackup. I can't follow the flow at all of how values get stored in AnimatedValuesBackup.

To maintain single-free semantics, these `TrackCache*` values must be **moved** and **owned by** the AnimatedValuesBackup.

TrackCache pointers must never be shared by other objects, otherwise a use-after-free or double-delete is likely to happen

### Steps to reproduce

1. Follow the steps in #85232 to Apply Reset on an opened gltf
2. Select the gltf in the filesystem (it will already be selected if you followed the steps)
3. Open the Import dock and click Reimport
4. Godot will crash.

### Minimal reproduction project

[ApplyReset.zip](https://github.com/godotengine/godot/files/13442920/ApplyReset.zip)

Vector3 get_root_motion_position() const;
	Quaternion get_root_motion_rotation() const;
	Vector3 get_root_motion_scale() const;
	Vector3 get_root_motion_position_accumulator() const;
	Quaternion get_root_motion_rotation_accumulator() const;
	Vector3 get_root_motion_scale_accumulator() const;
	
	void make_animation_instance(const StringName &p_name, const PlaybackInfo p_playback_info);
	void clear_animation_instances();
	virtual void advance(double p_time);
	virtual void clear_caches(); 
	void set_reset_on_save_enabled(bool p_enabled);
	bool is_reset_on_save_enabled() const;
#ifdef TOOLS_ENABLED
	void set_editing(bool p_editing);
	bool is_editing() const;
	void set_dummy(bool p_dummy);
	bool is_dummy() const;
	bool can_apply_reset() const;
	void _build_backup_track_cache();
	Ref<AnimatedValuesBackup> make_backup();
	Ref<AnimatedValuesBackup> apply_reset(bool p_user_initiated = false);
	void restore(const Ref<AnimatedValuesBackup> &p_backup);
	void reset();
#endif 
	AnimationMixer();
	~AnimationMixer();
};
#ifdef TOOLS_ENABLED
class AnimatedValuesBackup : public RefCounted {