Lots of factors. Sounds like they all came together with you and the 45. Regarding the 9mm, it could be a bad fit, you could have bad habits with that gun, or it could be a bad gun. IMHO, it's usually the shooter, so consider taking some video of you and your 45, and then you and your 9 mm, and then compare. Also, shoot off a bag or support and see if that makes much difference.
"Society’s abuse, misuse, or lack of use of its rights will not impinge upon my rights."