Are you starting to shoot a bit faster nearing the end of your shooting session? if so, your issue might be similar to mine.
during slow fire i’d be on target. but when i sped up - like more than two shots per second, my hits would be down and to the right (i’m a lefty) in a pretty consistent pattern.
during a tigerswan pistol class, i pointed this out, and the instructor took a look at my target and my glock, and said ‘not enough finger’. he demonstrated it by making me get into my normal firing grip, with finger on the trigger (with an unloaded pistol of course), then rotating my fore arm so it was vertical, and i was looking at the top of the slide. he had me take up the slack/pre-travel in the trigger and release (not actually firing the pistol), over and over, faster and faster while i observed what happened to the muzzle when i did so.
every time i pressed the trigger, the muzzle moved to the right slightly. the issue i was having was that i was using the pad of my trigger finger to pull the trigger back. as the finger moved back, it was also pushing the muzzle over to the side and down - i did not have a straight-back pull. he told me to use part of the pad nearer the first joint, or place the joint on the trigger - ‘more finger’ in other words. i did so, performed the same exercise, and the muzzle moved much less.
the idea of the exercise was to find the placement of the trigger finger on the trigger such that lateral movement of the muzzle is minimized - and you find that position where you get a straight-back pull.
now that i was aware of this, i put it into practice and saw an immediate improvement.
slow fire and dummy drills didn’t diagnose this because i was pulling the trigger back slowly enough such that i could make minor corrections to line the sights back on target if needed.
this was my issue and what worked for me - it may not be yours, so YMMV. but at least do the trigger exercise with the muzzle vertical and see which way your finger is pushing or pulling the muzzle, then try to find that neutral finger position and use that next time at the range and see if that makes a difference.
ask your instructor at your pistol class to diagnose the issue, for sure.