src/vs/workbench/services/userDataProfile/common/globalStateProfile.ts/GlobalStateProfile/writeLocalGlobalState
class GlobalStateProfile:	private async writeLocalGlobalState(globalState: IGlobalState): Promise<void> {
		const profileKeys: string[] = Object.keys(globalState.storage);
		const updatedStorage: IStringDictionary<any> = globalState.storage;
		for (const { key } of Registry.as<IProfileStorageRegistry>(Extensions.ProfileStorageRegistry).all) {
			if (!profileKeys.includes(key)) {
				// Remove the key if it does not exist in the profile
				updatedStorage[key] = undefined;
			}
		}
		const updatedStorageKeys: string[] = Object.keys(updatedStorage);
		if (updatedStorageKeys.length) {
			this.logService.trace(`Profile: Updating global state...`);
			for (const key of updatedStorageKeys) {
				this.storageService.store(key, globalState.storage[key], StorageScope.PROFILE, StorageTarget.USER);
			}
			this.logService.info(`Profile: Updated global state`, updatedStorageKeys);
		}
	}