How are we suppose to do threefold repetition ?
Its not. Once a position has been repeated 3 times you need to claim the draw by clicking the draw button. Remember that for the position to be considered the same the side with the right to move must be the same.
Chess.com is never wrong. Get that in your mind sir. If something unexpected happens you did something wrong.
The only automatic draws are by insufficient material or stalemate.