And you've already tried reinstalling from a fresh download? That would be my suggestion. It appears to be a very unique bug.
yeah, I had the bug on 1.17.2, then i noticed i am playing on outdated version so i downloaded the newest one (just 1.18.2 version, not the patch one) and it still happens