### Godot version

v4.0.3.stable.official [5222a99f5]

### System information

Windows 10

### Issue description

In an _Animation BlendTree_, if you connect a **TimeScale node with a negative value** (to play an animation, in this case, with Linear Loop, in reverse) after a **Transition node with XFade Time**, and request a **switch between states**, the resulting animation gets completely messed up.

Putting the timescale before the transition (and right after the Animation nodes) solves the problem, but creates an excessively large number of repeated nodes if you have several animations to transition between.

Other issues may steam from improper handling of animations being played in reverse, specially in complex Animation BlendTrees. Blend2 doesn't seem to take too kindly to them, with weird blending between looped animations with positive and negative timescales.

### Steps to reproduce

1. Create a BlendTree for an animated character (in my case Imported from Blender as a .glb file and created as an Inherited Scene).
2. Setup your BlendTree like this:
![image](https://github.com/godotengine/godot/assets/9821920/c7de45f7-3143-4e38-9e5c-073a9f65af17)
3. Click in the Transition node (Make sure it has an XFade Time of like 0.25s) to switch between states.
4. Watch as your character takes off.

### Minimal reproduction project

[TestRoom.zip](https://github.com/godotengine/godot/files/11580499/TestRoom.zip)
set_parameter(request, ONE_SHOT_REQUEST_NONE);
		set_parameter(internal_active, true);
		set_parameter(active, true);
	}
	real_t blend = 1.0;
	bool use_blend = sync;
	if (cur_time < fade_in) {
		if (fade_in > 0) {
			use_blend = true;
			blend = cur_time / fade_in;
			if (fade_in_curve.is_valid()) {
				blend = fade_in_curve->sample(blend);
			}
		} else {
			blend = 0; 
		}
	} else if (!do_start && !is_fading_out && cur_remaining <= fade_out) {
		is_fading_out = true;
		cur_fade_out_remaining = cur_remaining;
		set_parameter(internal_active, false);
	}
	if (is_fading_out) {
		use_blend = true;
		if (fade_out > 0) {
			blend = cur_fade_out_remaining / fade_out;
			if (fade_out_curve.is_valid()) {
				blend = 1.0 - fade_out_curve->sample(1.0 - blend);
			}
		} else {
			blend = 0;