Thank you for contacting Syncfusion support.
You can handle DocumentWindow when you close the window using the DocumentClosing event of DocumentContainer and handle Dock and Float window when you close the window using the WindowClosing event of DockingManager. We have prepared the sample that tries to meet your requirement. In this sample we have cancel the DocumentClosing and WindowClosing.
You can download the sample from the following attachment.
Please let us know if it helps you.