src/vs/platform/windows/electron-main/windowsStateHandler.ts/WindowsStateHandler/getNewWindowState
class WindowsStateHandler:	getNewWindowState(configuration: INativeWindowConfiguration): INewWindowState {
		const state = this.doGetNewWindowState(configuration);
		const windowConfig = this.configurationService.getValue<IWindowSettings | undefined>('window');

		// Window state is not from a previous session: only allow fullscreen if we inherit it or user wants fullscreen
		let allowFullscreen: boolean;
		if (state.hasDefaultState) {
			allowFullscreen = !!(windowConfig?.newWindowDimensions && ['fullscreen', 'inherit', 'offset'].indexOf(windowConfig.newWindowDimensions) >= 0);
		}

		// Window state is from a previous session: only allow fullscreen when we got updated or user wants to restore
		else {
			allowFullscreen = !!(this.lifecycleMainService.wasRestarted || windowConfig?.restoreFullscreen);

			if (allowFullscreen && isMacintosh && this.windowsMainService.getWindows().some(window => window.isFullScreen)) {
				// macOS: Electron does not allow to restore multiple windows in
				// fullscreen. As such, if we already restored a window in that
				// state, we cannot allow more fullscreen windows. See
				// https://github.com/microsoft/vscode/issues/41691 and
				// https://github.com/electron/electron/issues/13077
				allowFullscreen = false;
			}
		}

		if (state.mode === WindowMode.Fullscreen && !allowFullscreen) {
			state.mode = WindowMode.Normal;
		}

		return state;
	}