Some notebooks like the Kusto Notebooks depends on onDidCloseNotebookDocument to clean up any connections and dispose of anything important for the Notebook opened.
This isn't possible now and the closest workaround is to use onDidSaveNotebookDocument and maybe in the extension deactivate function to do any leftover clean up which isn't ideal.