I seem to have a similar problem, however i can play well over the board and on chess.com, however im terrible when i play against computers.
I think the problem is that (just a guess) when you dont see a physical person playing against you, you lose the competative motivation, and dont take the game as seriously. I would just try to focus on and care more about every precious rating point, because losing will make you lose them.
I seem to have a problem in chess that when I am playing at a tournament or any other competitive game, I am able to focus much more than here on chess.com, where I sometimes just make whatever move feels okay. How do i get myself to take chess.com games more seriously so I can improve more?