I'm having a weird problem with Ubuntu 20.04.2. After some time logging in I can't switch between applications through the dock because clicking on the icons there has no effect. I can't also access any function on top bar because of the same reason. Desktop icons also don't respond to clicks. I can only switch between apps by alt+tabbing. I have to log out and log back in to solve this problem.
It is probably happening because I have a problematic hard disk. I'm going to replace it with an SSD soon but I want to know how an hard drive failure can cause such a problem.
Note: I don't use any gnome extension.