### Godot version

v4.1.stable.official [970459615]

### System information

Windows 10

### Issue description

When changing the `file_mode` of `FileDialog` from "Open File" to "Save File" via code the "Save" button keeps disabled until a file or folder is selected if the "Open" button was disabled before.

Basically the button activity has to be updated when `file_mode` is changed. I have made the change already but the last time I opened an PR without an issue some people requested I open one. So here you are!

### Steps to reproduce

- Open the MRP and start it
- click anywere to open the dialog
- after 10 seconds the dialog changes file_mode
- if the button is disabled before the change it is as well after it

### Minimal reproduction project

[file_dialogue_test.zip](https://github.com/godotengine/godot/files/11991311/file_dialogue_test.zip)

refresh->set_icon(theme_cache.reload);
			show_hidden->set_icon(theme_cache.toggle_hidden);
			dir_up->add_theme_color_override("icon_normal_color", theme_cache.icon_normal_color);
			dir_up->add_theme_color_override("icon_hover_color", theme_cache.icon_hover_color);
			dir_up->add_theme_color_override("icon_focus_color", theme_cache.icon_focus_color);
			dir_up->add_theme_color_override("icon_pressed_color", theme_cache.icon_pressed_color);
			dir_prev->add_theme_color_override("icon_color_normal", theme_cache.icon_normal_color);
			dir_prev->add_theme_color_override("icon_color_hover", theme_cache.icon_hover_color);
			dir_prev->add_theme_color_override("icon_focus_color", theme_cache.icon_focus_color);
			dir_prev->add_theme_color_override("icon_color_pressed", theme_cache.icon_pressed_color);
			dir_next->add_theme_color_override("icon_color_normal", theme_cache.icon_normal_color);
			dir_next->add_theme_color_override("icon_color_hover", theme_cache.icon_hover_color);
			dir_next->add_theme_color_override("icon_focus_color", theme_cache.icon_focus_color);
			dir_next->add_theme_color_override("icon_color_pressed", theme_cache.icon_pressed_color);
			refresh->add_theme_color_override("icon_normal_color", theme_cache.icon_normal_color);
			refresh->add_theme_color_override("icon_hover_color", theme_cache.icon_hover_color);
			refresh->add_theme_color_override("icon_focus_color", theme_cache.icon_focus_color);
			refresh->add_theme_color_override("icon_pressed_color", theme_cache.icon_pressed_color);
			show_hidden->add_theme_color_override("icon_normal_color", theme_cache.icon_normal_color);
			show_hidden->add_theme_color_override("icon_hover_color", theme_cache.icon_hover_color);
			show_hidden->add_theme_color_override("icon_focus_color", theme_cache.icon_focus_color);
			show_hidden->add_theme_color_override("icon_pressed_color", theme_cache.icon_pressed_color);
			invalidate();
		} break;
		case NOTIFICATION_TRANSLATION_CHANGED: {
			update_filters();
		} break;
	}
}
void FileDialog::shortcut_input(const Ref<InputEvent> &p_event) {