Cool idea! There's a bug on level three, moving right when the red square is in the pocket and flag is opposite makes them pass through each other and doesn't win.
I updated the game with a new build. Let me know if the error is still there for you 🙏