Optimizing for Gaming causes the mouse cursor to become stuck in the VM guest window. If you have problem with the tracker all you need to do is update the firmware (very common problem from the old days), there an autoupdate option for this but you can also search for the program inside here if you allready have installed the logitech gamming thing: C:\Program Files\Logitech Gaming Software\FWUpdate. Those options have absolutely no effect on mouse wheel movement. If the problem is the infinite wheel spin, then all you have to do is lock it down with that toggle/mecanical swich on the middle of the mouse, if this doesn't work then you might as well have a broke mecanism and should be send to warrantys. In the right pane, turn the toggle towards off below ‘ Scroll inactive windows when I Hover over them ’.
If for some reason Logitech Gamming Software don't allow you to do this I been playing arround with Logitech G HUB and can do same macros and all on the G502, including remaping the side-scroll to anything you like, the program is ligther and definitly solve some of my issues, but I'm still trying to find a way to reverse the internal memory back to factory default (memory wipe). Open the Windows Settings You can do so from the start menu, or use the keyboard shortcut Win + I. Well if the problem is the side-scroll buttom, you can disable that buttom.