### 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
CheckBox *bake_blendshape = nullptr;
	CheckBox *bake_value = nullptr;
	SpinBox *bake_fps = nullptr;
	ConfirmationDialog *optimize_dialog = nullptr;
	SpinBox *optimize_velocity_error = nullptr;
	SpinBox *optimize_angular_error = nullptr;
	SpinBox *optimize_precision_error = nullptr;
	ConfirmationDialog *cleanup_dialog = nullptr;
	CheckBox *cleanup_keys = nullptr;
	CheckBox *cleanup_tracks = nullptr;
	CheckBox *cleanup_all = nullptr;
	ConfirmationDialog *scale_dialog = nullptr;
	SpinBox *scale = nullptr;
	ConfirmationDialog *ease_dialog = nullptr;
	OptionButton *transition_selection = nullptr;
	OptionButton *ease_selection = nullptr;
	SpinBox *ease_fps = nullptr;
	void _select_all_tracks_for_copy();
	void _edit_menu_about_to_popup();
	void _edit_menu_pressed(int p_option);
	int last_menu_track_opt = 0;
	void _cleanup_animation(Ref<Animation> p_animation);
	void _anim_duplicate_keys(bool transpose);
	void _view_group_toggle();
	Button *view_group = nullptr;
	Button *selected_filter = nullptr;
	void _selection_changed();
	ConfirmationDialog *track_copy_dialog = nullptr;
	Tree *track_copy_select = nullptr;
	struct TrackClipboard {