You evidently never learned about stalemate. In your first position, you have stalemated your opponent. They have no legal moves but are not in check.
For the last several hundred years, that has been declared a draw.
In the second one, you got checkmated. You have no legal moves but you are in check.
There is a difference.
THE CHESS.COM PLATFORM IS A REAL JOKE AND MAKING MORE AND MORE IDIOTS USERS, IN ADDITION TO THE CURRENT PROBLEM THAT THE GREAT MOST OF USERS HERE HAVE BEEN FACING, WHICH IS COMMUNICATION FAILURES, ESPECIALLY WHEN WE ARE IN THE MIDDLE OF A MATCH AND SIMPLY THE CONNECTION IS LOST OR APPEARS OUT OF NOTHING YOU MISSED THE MATCH BECAUSE THE TIME IS OVER, AND YOU HAD ENOUGH TIME TO PLAY, THIS IS REVOLTING AND GETS RIDICULOUS. AND ANOTHER PROBLEM THAT ALSO REVOLTS IS THE LOGIC USED BY THEM IN RELATION TO THE GAMES, WHERE A COMPLETELY DESCABBLE AND INTOLERABLE LOGIC IS IMPLEMENTED. Just below there are two matches I played today, where the first match resulted in a draw, as the platform claimed that due to lack of material the match was ended and delivering a draw for both players.
(MATCH THAT CAUSED A DRAW)
In this second game just below, I lost. And as you can see, the amount of material I had was visibly lower than the previous game and even so the platform did not end the game due to lack of material, it simply continued the game until finally my opponent finished me with a checkmate. . In short, he insists on saying that these grotesque failures that occur in an irresponsible way, have been making this platform totally lose its credibility, unfortunately.
(DEPARTURE THAT CAUSED MY DEFEAT)