Thanks for the feedback!
Currently you can deselect attack / unit by pressing the right mouse button. I should have put that information somewhere in the game, my mistake. I'll also add a "Cancel" button, visible when in attack mode. That should make it more clear. I also forgot to disable the attack when switching units. It will be fixed in the post-jam version.