### 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->add_separator();
					menu->add_icon_item(get_editor_theme_icon(SNAME("Remove")), TTR("Delete Key(s)"), MENU_KEY_DELETE);
				}
				menu->reset_size();
				menu->set_position(get_screen_position() + get_local_mouse_position());
				menu->popup();
				insert_at_pos = offset + timeline->get_value();
				accept_event();
			}
		}
	}
	if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && clicking_on_name) {
		if (!path) {
			path_popup = memnew(Popup);
			path_popup->set_wrap_controls(true);
			add_child(path_popup);
			path = memnew(LineEdit);
			path_popup->add_child(path);
			path->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
			path->connect("text_submitted", callable_mp(this, &AnimationTrackEdit::_path_submitted));
		}
		path->set_text(animation->track_get_path(track));
		Vector2 theme_ofs = path->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"))->get_offset();
		path_popup->set_position(get_screen_position() + path_rect.position - theme_ofs);
		path_popup->set_size(path_rect.size);
		path_popup->popup();
		path->grab_focus();
		path->set_caret_column(path->get_text().length());
		clicking_on_name = false;
	}