### Godot version

4.0.dev (c309de53997feff3286295fb2d71657f112a15db)

### System information

Linux, Nvidia, Vulkan

### Issue description

Editor segfaults when certain conditions are met when using the AnimationPlayer editor.

### Steps to reproduce

1. Create multiple animations, saved into a animation collection
2. Open an existing animation, then make a new empty animation
3. Change from seconds to fps, or add a new property to animate ()
4. Editor crashes

NOTE: It is slightly random and I have not found a perfect repro

### Minimal reproduction project

N/A (TBD?)
ease_grid->add_child(ease_label1);
	ease_grid->add_child(transition_selection);
	ease_grid->add_child(ease_label2);
	ease_grid->add_child(ease_selection);
	ease_grid->add_child(ease_label3);
	ease_grid->add_child(ease_fps);
	
	bake_dialog = memnew(ConfirmationDialog);
	bake_dialog->set_title(TTR("Anim. Baker"));
	bake_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_BAKE_ANIMATION_CONFIRM));
	add_child(bake_dialog);
	GridContainer *bake_grid = memnew(GridContainer);
	bake_grid->set_columns(2);
	bake_dialog->add_child(bake_grid);
	bake_trs = memnew(CheckBox);
	bake_trs->set_pressed(true);
	bake_blendshape = memnew(CheckBox);
	bake_blendshape->set_pressed(true);
	bake_value = memnew(CheckBox);
	bake_value->set_pressed(true);
	bake_fps = memnew(SpinBox);
	bake_fps->set_min(1);
	bake_fps->set_max(999);
	bake_fps->set_step(1);
	bake_fps->set_value(30); 
	Label *bake_label1 = memnew(Label);
	Label *bake_label2 = memnew(Label);
	Label *bake_label3 = memnew(Label);
	Label *bake_label4 = memnew(Label);
	bake_label1->set_text("Pos/Rot/Scl3D Track:");