### 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
TreeItem *root_item = pick_track->get_scene_tree()->get_scene_tree()->get_root();
	Vector<Node *> select_candidates;
	Node *to_select = nullptr;
	String filter = pick_track->get_filter_line_edit()->get_text();
	_pick_track_select_recursive(root_item, filter, select_candidates);
	if (!select_candidates.is_empty()) {
		for (int i = 0; i < select_candidates.size(); ++i) {
			Node *candidate = select_candidates[i];
			if (((String)candidate->get_name()).to_lower().begins_with(filter.to_lower())) {
				to_select = candidate;
				break;
			}
		}
		if (!to_select) {
			to_select = select_candidates[0];
		}
	}
	pick_track->get_scene_tree()->set_selected(to_select);
}
void AnimationTrackEditor::_pick_track_select_recursive(TreeItem *p_item, const String &p_filter, Vector<Node *> &p_select_candidates) {