Please try running the game with a stable Wi-Fi connection and check if any icons appear next to the character's health bar, these icons will tell you possible reasons for delays and crashes during the game. The reason for the failures may be a weak wireless connection on your side, in which case the defeat is counted to you.