Look up pawn captures "en passant". It is perfectly legal.
The computer cheats.

Don't you worry your head about computers cheating on chess.com. Computers also run the NYSE and the NASDAQ now, and I've heard some stories about that from people in a position to know.
I’ve been playing against the computer on the app and it is a blatant cheater. Several times now it has illegally taken a pawn. Screenshots provided. You can see that I move my pawn (black) up two tiles, and it is then taken by a white pawn that moves into the first tile. WTF?????
https://www.chess.com/article/view/his-pawn-cheated-and-killed-my-pawn

I’ve been playing against the computer on the app and it is a blatant cheater. Several times now it has illegally taken a pawn. Screenshots provided. You can see that I move my pawn (black) up two tiles, and it is then taken by a white pawn that moves into the first tile. WTF?????
https://www.chess.com/article/view/his-pawn-cheated-and-killed-my-pawn
You stole my thunder! I love to post links to this article.
I’ve been playing against the computer on the app and it is a blatant cheater. Several times now it has illegally taken a pawn. Screenshots provided. You can see that I move my pawn (black) up two tiles, and it is then taken by a white pawn that moves into the first tile. WTF?????
https://ibb.co/wrRtYLp
https://ibb.co/2tkFFMr
https://ibb.co/Vjtw2Ym
https://ibb.co/cgYCkQJ