Hi.
Raycast is not really mend to use with on exit that's why raycast does not have a on exit/on enter/ on stay (in unity scripting)
But there is an action called raycast 2 on the
Ecosystemthat has a 'no hit' event.
But it might be better to use a trigger instead.