### Godot version

4.0.rc

### System information

Any

### Issue description

If the RESET animation is generated at the same time as the Bezier track is generated, the bezier edit button will not be active.

![image](https://user-images.githubusercontent.com/61938263/218256176-88b1b196-7b6b-4404-84ad-e8694f23bb1b.png)

Also, if you delete a track in the Bezier Editor, or in undo redo, it will not update correctly.

### Steps to reproduce

![image](https://user-images.githubusercontent.com/61938263/218256230-4b0219d5-87e4-453a-8294-59f8feb0cfd5.png)


### Minimal reproduction project

N/A
}
						}
						keys.sort();
						keymap.insert(tracks[i], keys);
					} break;
					default: {
					} break;
				}
			}
			
			HashMap<int, Vector<int>>::Iterator E = keymap.begin();
			while (E) {
				int track = E->key;
				Vector<int> keys = E->value;
				int len = keys.size() - 1;
				
				bool is_using_angle = animation->track_get_interpolation_type(track) == Animation::INTERPOLATION_LINEAR_ANGLE || animation->track_get_interpolation_type(track) == Animation::INTERPOLATION_CUBIC_ANGLE;
				
				Vector<Pair<real_t, Variant>> insert_queue_new;
				for (int i = 0; i < len; i++) {
					
					if (keys[i] + 1 == keys[i + 1]) {
						double from_t = animation->track_get_key_time(track, keys[i]);
						double to_t = animation->track_get_key_time(track, keys[i + 1]);
						Variant from_v = animation->track_get_key_value(track, keys[i]);
						Variant to_v = animation->track_get_key_value(track, keys[i + 1]);
						if (is_using_angle) {
							real_t a = from_v;
							real_t b = to_v;
							real_t to_diff = fmod(b - a, Math_TAU);