### Godot version

4.0.stable

### System information

Windows 10, Forward+, GTX 1070 driver 528.49

### Issue description

When trying to edit the handle mode of a bezier cruve key from the inspector tab, the mode doesn't change. It works fine when right clicking on the key and setting the handle mode from here though. 

https://user-images.githubusercontent.com/24484962/222379540-29d71b6d-ff0c-4a21-9905-9750d0581fda.mp4



### Steps to reproduce

On an animation track using a bezier curve, select a key and try to change the handle mode from the inspector tab

### Minimal reproduction project

N/A
ERR_FAIL_INDEX(p_track, animation->get_track_count());
	if (snap->is_pressed() && step->get_value() != 0) {
		p_ofs = snap_time(p_ofs);
	}
	while (animation->track_find_key(p_track, p_ofs, Animation::FIND_MODE_APPROX) != -1) { 
		p_ofs += 0.0001;
	}
	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	switch (animation->track_get_type(p_track)) {
		case Animation::TYPE_POSITION_3D: {
			if (!root->has_node(animation->track_get_path(p_track))) {
				EditorNode::get_singleton()->show_warning(TTR("Track path is invalid, so can't add a key."));
				return;
			}
			Node3D *base = Object::cast_to<Node3D>(root->get_node(animation->track_get_path(p_track)));
			if (!base) {
				EditorNode::get_singleton()->show_warning(TTR("Track is not of type Node3D, can't insert key"));
				return;
			}
			Vector3 pos = base->get_position();
			undo_redo->create_action(TTR("Add Position Key"));
			undo_redo->add_do_method(animation.ptr(), "position_track_insert_key", p_track, p_ofs, pos);
			undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", p_track, p_ofs);