Under FIDE rules, you are absolutely correct and the result would have been a win for white. However, chess.com uses rules which are similar to the USCF rules where unless checkmate can be forced, it is declared a draw. In this case, checkmate would only have been possible with the help of your opponent and not forced so it is declared a draw.
https://support.chess.com/article/128-what-does-insufficient-mating-material-mean
In the final position of this game, my opponent ran out of time and it declared the position a draw. However, I was under the impression that if any checkmate is legal in a position, it shall be declared a win. A checkmate is possible in the position like this:
Am I understanding the rule wrong, or did chess.com make an error in calling this game a draw?