### 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)

confirm_save->connect("confirmed", callable_mp(this, &FileDialog::_save_confirm_pressed));
	makedialog = memnew(ConfirmationDialog);
	makedialog->set_title(RTR("Create Folder"));
	VBoxContainer *makevb = memnew(VBoxContainer);
	makedialog->add_child(makevb);
	makedirname = memnew(LineEdit);
	makedirname->set_structured_text_bidi_override(TextServer::STRUCTURED_TEXT_FILE);
	makevb->add_margin_child(RTR("Name:"), makedirname);
	add_child(makedialog, false, INTERNAL_MODE_FRONT);
	makedialog->register_text_enter(makedirname);
	makedialog->connect("confirmed", callable_mp(this, &FileDialog::_make_dir_confirm));
	mkdirerr = memnew(AcceptDialog);
	mkdirerr->set_text(RTR("Could not create folder."));
	add_child(mkdirerr, false, INTERNAL_MODE_FRONT);
	exterr = memnew(AcceptDialog);
	exterr->set_text(RTR("Invalid extension, or empty filename."));
	add_child(exterr, false, INTERNAL_MODE_FRONT);
	update_filters();
	update_dir();
	set_hide_on_ok(false);
	if (register_func) {
		register_func(this);
	}
}
FileDialog::~FileDialog() {
	if (unregister_func) {
		unregister_func(this);
	}
}