### 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
}
				}
			}
			undo_redo->add_do_method(this, "_clear_selection_for_anim", animation);
			undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation);
			undo_redo->add_do_method(this, "_redraw_tracks");
			undo_redo->add_undo_method(this, "_redraw_tracks");
			undo_redo->commit_action();
			_update_key_edit();
		} break;
		case EDIT_OPTIMIZE_ANIMATION: {
			optimize_dialog->popup_centered(Size2(250, 180) * EDSCALE);
		} break;
		case EDIT_OPTIMIZE_ANIMATION_CONFIRM: {
			animation->optimize(optimize_velocity_error->get_value(), optimize_angular_error->get_value(), optimize_precision_error->get_value());
			_redraw_tracks();
			_update_key_edit();
			EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
			undo_redo->clear_history(true, undo_redo->get_history_id_for_object(animation.ptr()));
			undo_redo->clear_history(true, undo_redo->get_history_id_for_object(this));
		} break;
		case EDIT_CLEAN_UP_ANIMATION: {
			cleanup_dialog->popup_centered(Size2(300, 0) * EDSCALE);
		} break;
		case EDIT_CLEAN_UP_ANIMATION_CONFIRM: {
			if (cleanup_all->is_pressed()) {
				List<StringName> names;
				AnimationPlayerEditor::get_singleton()->get_player()->get_animation_list(&names);
				for (const StringName &E : names) {
					_cleanup_animation(AnimationPlayerEditor::get_singleton()->get_player()->get_animation(E));