### 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 show_hidden_files;
}
void EditorFileDialog::set_default_show_hidden_files(bool p_show) {
	default_show_hidden_files = p_show;
}
void EditorFileDialog::set_default_display_mode(DisplayMode p_mode) {
	default_display_mode = p_mode;
}
void EditorFileDialog::_save_to_recent() {
	String cur_dir = get_current_dir();
	Vector<String> recent_new = EditorSettings::get_singleton()->get_recent_dirs();
	const int max = 20;
	int count = 0;
	bool res = cur_dir.begins_with("res://");
	for (int i = 0; i < recent_new.size(); i++) {
		bool cres = recent_new[i].begins_with("res://");
		if (recent_new[i] == cur_dir || (res == cres && count > max)) {
			recent_new.remove_at(i);
			i--;
		} else {
			count++;
		}
	}
	recent_new.insert(0, cur_dir);
	EditorSettings::get_singleton()->set_recent_dirs(recent_new);
}
void EditorFileDialog::set_disable_overwrite_warning(bool p_disable) {