Oooh, I see. I'd argue that you're trying to solve the wrong problem. The issue isn't that you need to stop enemies from moving, you really SHOULD be suspending the game for this, and you need to figure out how to show the animation you want anyway.
Which is pretty simple:
hero:get_sprite():set_ignore_suspend(true)
I mean, your solution technically works so it's not wrong, and maybe should is a strong word. But effectively what you're describing is you do want the game to suspend. You don't want enemies moving, or starting attacks, you wouldn't want NPCs to keep walking around, you wouldn't want some timer you've set to go off, etc. If you don't suspend the game you leave yourself open to a lot of potential conflicts I think