Simple solution: use an “isDead” boolean.
When you set the AI to die, set the isDead bool to true.
Then, pass that value to the behavior tree at the top level and set “isDead is Not Set” shown in the image
That way, when the AI dies, it cannot continue its actions.