onDetach
Runs when the entry leaves the modifier or the node is released, deactivated or reused, while every node of its chain is still attached. It also runs when the component moves into another composition.
A throw is reported to the thread's uncaught-exception handler and the node detaches, as if this had returned.