Hi,
Is your RMB still down? XD
If this is implemented in a mod I'd be interested to know. (but this was one of the first hits I found, so maybe I will find a mod in a while)
A workaround for me that works in Vanilla: Press the right mouse button, disconnect (mouse) USB, release right mouse button, reconnect USB.
Minecraft will keep thinking the RMB is down until you click it again.
Regards, Geert