### Godot version

4.0.2.stable

### System information

Fedora 37, GeForce RTX 4090 (NVIDIA 530.41.03)

### Issue description

Physical Keycode and Key Label options appear grayed out in the input editor when editing an existing key, even though I should logically be able to change it:

![image](https://github.com/godotengine/godot/assets/180032/54d4c3a5-4da5-4448-b42a-42f0c6870cc2)

If I set the key to another key then change it back, then the **Physical Keycode** and **Key Label** options are no longer grayed out.

cc @bruvzg

### Steps to reproduce

- Open the Project Settings > Input Map tab.
- Create an action, with an associated key. Save it.
- Click the edit button next to the key, and try to change the type without touching the actual key's value.
- Change the key's value back and forth and try to change the type using the dropdown again.

### Minimal reproduction project

N/A
TreeItem *selected = input_list_tree->get_selected();
	
	if (in_tree_update) {
		return;
	}
	
	if (selected->has_meta("__type")) {
		return;
	}
	InputType input_type = (InputType)(int)selected->get_parent()->get_meta("__type");
	switch (input_type) {
		case INPUT_KEY: {
			Key keycode = (Key)(int)selected->get_meta("__keycode");
			Ref<InputEventKey> k;
			k.instantiate();
			k->set_physical_keycode(keycode);
			k->set_keycode(keycode);
			k->set_key_label(keycode);
			
			k->set_alt_pressed(mod_checkboxes[MOD_ALT]->is_pressed());
			k->set_shift_pressed(mod_checkboxes[MOD_SHIFT]->is_pressed());
			if (autoremap_command_or_control_checkbox->is_pressed()) {
				k->set_command_or_control_autoremap(true);
			} else {
				k->set_ctrl_pressed(mod_checkboxes[MOD_CTRL]->is_pressed());
				k->set_meta_pressed(mod_checkboxes[MOD_META]->is_pressed());
			}