### Godot version

v4.2.dev4.mono.official [549fcce5f]

### System information

window10 64bit

### Issue description

![GIF 2023-9-1 22-39-07](https://github.com/godotengine/godot/assets/35988767/d7be4a45-f5f0-4408-8758-f4bf9f3c9c5d)


### Steps to reproduce

/

### Minimal reproduction project

/
return;
		}
		
		if (!valid) {
			int idx = filter->get_selected();
			String flt = filters[idx].get_slice(";", 0);
			String ext = flt.get_slice(",", 0).strip_edges().get_extension();
			f += "." + ext;
		}
		if (file_name.begins_with(".")) { 
			error_dialog->set_text(TTR("Cannot save file with a name starting with a dot."));
			error_dialog->popup_centered(Size2(250, 80) * EDSCALE);
			return;
		}
		if (dir_access->file_exists(f) && !disable_overwrite_warning) {
			confirm_save->set_text(vformat(TTR("File \"%s\" already exists.\nDo you want to overwrite it?"), f));
			confirm_save->popup_centered(Size2(250, 80) * EDSCALE);
		} else {
			_save_to_recent();
			hide();
			emit_signal(SNAME("file_selected"), f);
		}
	}
}
void EditorFileDialog::_cancel_pressed() {
	file->set_text("");
	invalidate();
	hide();
}
void EditorFileDialog::_item_selected(int p_item) {