add debugger
key word into your node, restart node-red, open the browser & devtools, give it a go. Y
As i said earlier, I've not used it but i suspect it will fire when deleted from the editor (before deploy - so in other words, still active in the runtime).
If you want to remove callbacks at the server side, I would suggest you need to use this.on('close'
and its parameters to determine if there is a clean up (at server side) to do.