Thanks for your comment!
When the battle is set to auto, if it keeps looping even after being defeated, it becomes difficult for the player to turn auto mode off. Implementing that properly was tricky, so I ended up leaving it as it is for now.
that makes sense, thank you :)