Doublecheck back for some control panel process related to your mouse make and model. Someplace where the mouse buttons can be (or could have been) reconfigured via Ease of Access, Device Manager, perhaps some proprietary control panel.
Can you further narrow down where right-clicking works and does not work?
As an example, does right click work correctly up and until some specific game is played? And thereafter perhaps the right click is doing something else unseen that would be meaningful only within game play. And right click only appears not to be working. The game did not "release" right click.
See if the mouse manufacturer offers some testing utility. Or try some third party products. The objective is identify some...