src/vs/workbench/browser/parts/editor/editorWithViewState.ts/AbstractEditorWithViewState/setEditorVisible
class AbstractEditorWithViewState:	protected override setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void {

		// Listen to close events to trigger `onWillCloseEditorInGroup`
		this.groupListener.value = group?.onWillCloseEditor(e => this.onWillCloseEditor(e));

		super.setEditorVisible(visible, group);
	}