4.7 Lock mouse to viewport problem

I currently have this problem in version 4.12.5.