There is no such callback, since it would be a bad user experience. In a project you easily end up with 10-20 instances of the same plugin. Do you really want your plugin to pester the user with 20 popups, if you are ok to close the plugin, even the plugin is not responsible for anything?
The saving the state is done from the host, the turning processing on or off is done from the host… everything. It is designed, that the necessary interaction with the plugin happens in the editor.
If you just want to capture analytics, that’s fine to do in the destructor. But user interaction during shutdown is a bad idea. (Again, the only valid exception is a save dialog, which is done by the host).