It is likely you are flinching or pushing the firearm down trying to fight the recoil. Have a certified instructor or range officer shoot it. If that is not a viable option, buy some snap caps. Have a friend load a mag with live rounds and snap caps. Fire like normal and have your friend look to see if the barrel or firearm moves when the trigger is pulled on a snap cap. Some also have the bad habit of moving the firearm down or head up immediately after a shot to see if they hit the target. This affects accuracy. You should always be focusing on the front sight. The rear sight and target will be slightly fuzzy. Do not move your firearm or head immediately after firing a round.