Holding down right mouse button in viewport lag

I noticed lately that when I hold down my right mouse button to “fly” in my viewport with rmb and wasd makes my rmb do a click and drags for one second then right click and then continue to stutter like that which makes it impossible to work, is there a fix for this?