Question My mouse isn't working properly any solutions?

Jun 26, 2021
So this started happening a few days ago just randomly and I have no clue what started it. My mouse only works on one application at a time no matter what it is. So lets say I try to go to my taskbar to change to discord it wont let me, I would have to sit there clicking my taskbar over and over until it gives me access to it then after I do that I click on what I want to be on and then it opens then I have to click on it a few dozen times until I can be on that and then I have to repeat that over and over again and I haven't found any solutions to it.

Sometimes its perfectly fine and others its worse.

Mouse- G502

Computer Information
Processor Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz 2.40 GHz
Installed RAM 8.00 GB (7.84 GB usable)
System type 64-bit operating system, x64-based processor
Pen and touch Pen support