I had the exact same problem with an MX Anywhere mouse and an HP Spectre x360. By my research, it was caused by a bug in the newer Linux kernel versions. Some USB devices are incompatible with the USB auto suspend feature in Linux. In my case, it was the Bluetooth chip that was causing the mouse to lag after around 5 seconds of idle. I solved it by loosely following the steps in this post, which seems to accurately pinpoint the problem.
The post tells you to look for the USB mouse by running:
sudo lsusb -v
My mouse is a Bluetooth one, same as yours, so it obviously didn't show up with that. However, what did show up, among other devices, of course, was this:
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
bDeviceClass 224 Wireless
bDeviceSubClass 1 Radio Frequency
bDeviceProtocol 1 Bluetooth
idVendor 0x8087 Intel Corp.
This seemed to me like it could be the Bluetooth chip, and since there is a chance it could be incompatible with USB auto suspend, I tried turning USB auto suspend off for just this device (as directed in that post). My mouse worked perfectly after that, so it seems like my guess was right. Hope this works for you and anyone searching for a solution!
PS: some power saving utilities like powertop could also cause the same problems, so you should also try disabling all of those. (this is also mentioned in that post I linked to)