Found the best workaround so far, and it's very simple: Cancel using the Esc key rather than the mouse. Just gotta remember to do it that way. I generally do use the keyboard rather than mouse clicks; I'm not sure why in this case I have been clicking Cancel without even having tried the Esc key until tonight.
Still, I think that program behavior with the Cancel button is troublesome and should be changed. I suppose most ops either use the keyboard or the mouse but not the strange combination I was using (Enter for OK but mouse click for Cancel), so maybe not many have actually hand this problem. Still, it seems to me likely that a good many ops have lost Qs in their log without realizing it or without realizing why.