### 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
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	undo_redo->create_action(TTR("Change Track Path"));
	undo_redo->add_do_method(animation.ptr(), "track_set_path", track, p_text);
	undo_redo->add_undo_method(animation.ptr(), "track_set_path", track, animation->track_get_path(track));
	undo_redo->commit_action();
	path_popup->hide();
}
bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const {
	if (root == nullptr) {
		return false;
	}
	Ref<Resource> res;
	Vector<StringName> leftover_path;
	Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path);
	Object *obj = nullptr;
	if (res.is_valid()) {
		obj = res.ptr();
	} else if (node) {
		obj = node;
	}
	bool prop_exists = false;
	if (obj) {
		r_valid_type = obj->get_static_property_type_indexed(leftover_path, &prop_exists);
	}
	return (!prop_exists || Variant::can_convert(p_key_value.get_type(), r_valid_type));
}
Ref<Texture2D> AnimationTrackEdit::_get_key_type_icon() const {