Sure but I am curious about the rule. In my example the target escaped to the moon. But if the caster still gets to use a bonus action to inflict damage, then that wasn't an escape at all.I'd be going with no on that one, personally. If you've removed yourself from the fight to the point where it's totally irrelevant to your situation (like teleporting to the moon or any other place the enemy cannot conceivably get to), you pretty much can't spend actions on it.