That’s a game issue. You can try to force lock the mouse to the game window with a setting in the vorpX menu (‘Input’ page), but there is no guarantee that it will work. Also make sure to play in true fullscreen mode if you encounter a game with such an issue, not the “windowed fullscreen” or “borderless window” mode that for whatever strange reason became popular over the last few years.
There are dedicated tools to deal with things like this, which might be better than the option in the vorpX menu, IIRC one is aptly named Cursor Lock.