This is super easy to reproduce. Right-clicking where there isn't a note opens the context menu. So if you're trying to select one or more notes by right click-dragging, and you start your click-drag where there's no note (which is perfectly fine), if you let your finger up for a split second before you drag the cursor onto a note, the context menu opens.
It's easy to do because the right mouse button is controlled by your middle finger which is a little weaker and a little less coordinated than your index finger.
It's a pain and workflow killer because if all that happened was you lost the drawing rectangle, you could just click drag again. But because the context menu pops up, you have to his the escape key to make it go away before you can try again.
If we can customization you could assign the context menu function somewhere else so this wouldn't happen.