This is possible. Depending on your mouse software, you might be able to remap the buttons in it. Logitech and other gaming mice often come with software that easily lets you remap buttons.
AutoHotKey can remap mouse clicks as well.
There are third party software programs that do it as well. You can Google for them. Here is one site I found.
There are two ways you can acheive this:
Adjust the monitor position in Windows display settings(rectangles representing your monitors) so they are not exactly horizontally aligned; that way you will not be able to seamlessly move the cursor between them.
Install DisplayFusion; from there you can assign a shortcut to lock/unlock the mouse on specific ...
I know this question is old, but if someone else(like me for the past few weeks) is looking for a solution to this problem, maybe he/she finds this helpful.
The following solution worked in my case (credits go to Reddit user /u/zelloxy) :
"Start command prompt. Type powercfg -devicequery wake_armed. Enter powercfg -devicedisablewake <deviceName>. ...