Bit hard to see exactly what is happening there however a work around maybe to capture the mouse coordinates before the right click and store them, then after release set the mouse coordinates to their stored location.
Are you aiming for a User Interface similar to World of Warcraft? Mouse movement of Character but also able to move mouse to click on UI elements?
If so I’ll see what I can put together and upload a template.