In the past I have been able to execute code before deleting an object in blender using the method described in this post:
As far as i know this method wont work in blender 3.5 onwards since object.delete cant be unregistered. Is there an alternative way to create a delete handler or run code before deleting an object that wont require users to remap hotkeys?