### 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
menu->reset_size();
				Vector2 popup_pos = get_screen_position() + update_mode_rect.position + Vector2(0, update_mode_rect.size.height);
				menu->set_position(popup_pos);
				menu->popup();
				accept_event();
			}
			if (interp_mode_rect.has_point(pos)) {
				if (!menu) {
					menu = memnew(PopupMenu);
					add_child(menu);
					menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
				}
				menu->clear();
				menu->add_icon_item(get_editor_theme_icon(SNAME("InterpRaw")), TTR("Nearest"), MENU_INTERPOLATION_NEAREST);
				menu->add_icon_item(get_editor_theme_icon(SNAME("InterpLinear")), TTR("Linear"), MENU_INTERPOLATION_LINEAR);
				menu->add_icon_item(get_editor_theme_icon(SNAME("InterpCubic")), TTR("Cubic"), MENU_INTERPOLATION_CUBIC);
				
				AnimationPlayerEditor *ape = AnimationPlayerEditor::get_singleton();
				if (ape) {
					AnimationPlayer *ap = ape->get_player();
					if (ap) {
						NodePath npath = animation->track_get_path(track);
						Node *a_ap_root_node = ap->get_node(ap->get_root_node());
						Node *nd = nullptr;
						
						if (a_ap_root_node) {
							nd = a_ap_root_node->get_node(NodePath(npath.get_concatenated_names()));
						}
						if (nd) {
							StringName prop = npath.get_concatenated_subnames();