what do I do of the game glitches and it causes me to lose?


That move is en passant and a legal move: https://support.chess.com/article/683-what-is-en-passant
That move is en passant and a legal move: https://support.chess.com/article/683-what-is-en-passant