### Godot version

v4.2.rc2.official [1ba920fad]

### System information

Godot v4.2.rc2 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated AMD Radeon RX 6700 XT (Advanced Micro Devices, Inc.; 31.0.22023.1014) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)

### Issue description

When I enter fullscreen mode in the editor with shift + f11 while being in or then going to the 3D editor, I can't exit it anymore by pressing the same keybind.

### Steps to reproduce

Create a new Godot project
Press shift + f11 to enable editor fullscreen
Go to the 3D editor
Try to exit editor fullscreen with shift + f11

### Minimal reproduction project

Create a new Godot project
opening_prev = false;
		if (prev != -1) {
			_set_current_scene(prev);
			editor_data.remove_scene(idx);
		}
		return ERR_FILE_NOT_FOUND;
	}
	dependency_errors.erase(lpath); 
	for (KeyValue<String, HashSet<String>> &E : dependency_errors) {
		String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E.key) + "\n";
		for (const String &F : E.value) {
			txt += "\t" + F + "\n";
		}
		add_io_error(txt);
	}
	if (ResourceCache::has(lpath)) {
		
		Ref<PackedScene> ps = ResourceCache::get_ref(lpath);
		if (ps.is_valid()) {
			ps->replace_state(sdata->get_state());
			ps->set_last_modified_time(sdata->get_last_modified_time());
			sdata = ps;
		}
	} else {
		sdata->set_path(lpath, true); 
	}
	Node *new_scene = sdata->instantiate(p_set_inherited ? PackedScene::GEN_EDIT_STATE_MAIN_INHERITED : PackedScene::GEN_EDIT_STATE_MAIN);
	if (!new_scene) {
		sdata.unref();
		_dialog_display_load_error(lpath, ERR_FILE_CORRUPT);