src/vs/workbench/services/untitled/common/untitledTextEditorModel.ts/UntitledTextEditorModel/setMode
class UntitledTextEditorModel:	override setMode(mode: string): void {

		// Remember that an explicit mode was set
		this._hasModeSetExplicitly = true;

		let actualMode: string | undefined = undefined;
		if (mode === '${activeEditorLanguage}') {
			// support the special '${activeEditorLanguage}' mode by
			// looking up the language mode from the currently
			// active text editor if any
			actualMode = this.editorService.activeTextEditorMode;
		} else {
			actualMode = mode;
		}

		this.preferredMode = actualMode;

		if (actualMode) {
			super.setMode(actualMode);
		}
	}