Thank you for your comment, you are very kind.
The reason why you can retreat even when all your units are dead is so you can collect the money you have earn by destroying turrets. But we completely get that it can be frustrated if you don't have enough money and no more troops. If we had more time, we would have add a retry button among other things... But it's the game!
I am sorry for the bug you encountered, we didn't manage to test the game as much as we wanted at the end but having tested it many times since, I can assure you this bug is quite rare and you probably won't have it again... or so I hope!!
Play the game as many times as you want, my team and I are so glad people enjoy it.