I am faced with a similar problem. The bug appears when you exit the pie by clicking on the cross of the window. If you exit the stop or esc button, the bug does not appear.
In my case, the bug causes the option Progect Settings → input → Use Mouse For Touch. I turned it off and I do not observe glitches with the right mouse button.