This used to happen to me all the time (and still does, but to a lesser degree). I had two problems first was anticipating recoil so I was dropping the muzzle and squeezing with the trigger and grip rather than just using my index finger. I had my wife video record me while we were at the range and the camera showed what I was doing.With all my pistols, I shoot low and left. On a rest, I shoot straight so I know its me, not the gun. Should I just accept that I pull it all the time and aim right or keep trying to shoot straight? My groups are not bad
With an autoloader, just mix in a snap cap in a random location in the magazine.To find out if you are flinching have someone else load your gun where you can't see, just behind your back will do they don't have to go to the other end of the range you know. Then you fire it, if it's an empty gun it will be instantly obvious. Works best with a revolver because they can load a couple to get you lulled then the next will be empty, and if you are flinching it will be really apparent. But it will work with a pistol as well, it just takes more fussing about with it.