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

/
if (p_mouse_button_index != MouseButton::LEFT) {
		return;
	}
	item_list->deselect_all();
	
	switch (mode) {
		case FILE_MODE_OPEN_FILE:
		case FILE_MODE_OPEN_FILES:
			set_ok_button_text(TTR("Open"));
			get_ok_button()->set_disabled(!item_list->is_anything_selected());
			break;
		case FILE_MODE_OPEN_ANY:
		case FILE_MODE_OPEN_DIR:
			file->set_text("");
			get_ok_button()->set_disabled(false);
			set_ok_button_text(TTR("Select Current Folder"));
			break;
		case FILE_MODE_SAVE_FILE:
			
			break;
	}
}
void EditorFileDialog::_push_history() {