How can I stop my mouse from moving while still using it's outputs? (w/ Video Example)

The first half of the video shows me pressing the “Thumb Mouse Button” and it does what I want it to do, and the second half shows what happens when I press “Tab” or any other keyboard binding I set it to.


This is how I have it setup. ^

*Something I noticed is that regardless if I have a mouse binding set or not, if I press any mouse button at the same time as the key I want, (Tab for example is set) that will also cause the mouse to not move until the UI is brought back, just like I want.

Note: I don’t want to update the mouse on tick to keep it still and I don’t want to save the mouse location then put it back when showing it again. I would also prefer to avoid using a cosmetic/fake mouse.