jimmyjr, this may be accidentally "hijacking" a thread but it's certainly related to the opening post.
It could be a lot of things.
The fundamentals can usually defeat any accuracy problem. It's a real eye opener.
Please google "thecorneredcat basics of pistol shooting" excellent photos.
Please google fundamentals of pistol shooting.
Sounds boring, but it's a lot more fun if you hold your (empty safety-checked) pistol in hand and try it live as you read it.
M&P's, Glocks, have striker fired triggers with a longer rolling trigger break and a bit more overtravel. So a little more attention needs to be paid to achieve a smooth "straight to the rear" trigger pull. Most service pistols (including M&P's and Glocks) should be able to hit about a 4 inch group at 25 yards with premium ammo, which does translate into a 1-2 ish inch group at 7 yards if the shooter is up to it (no physical issues). I have done that with a compact M&P.
If you haven't tried snap caps for dry fire practice, look into Azoom. They can survive hundreds of dry fires. Play with your grip, trigger finger placement and a slow pull until you can dry fire without the front sight moving. For a challenge balance a coin on the front sight. If your groups are consistently low or low left, it's an anticipation issue and a gradual surprise break to the trigger pull will help. If your shots are scattered evenly all over, focusing hard on the front sight (really hard, blink if your eye won't focus on the front sight at first) with dry fire will help. Your target will be blurry and your rear sight will be blurry, and that's how it's supposed to be when you start pulling your trigger slowly.
Having said that, for some reason you like the Beretta. You could sell yours and purchase a Beretta, but I think it's more important to adjust your technique first because you would see limitations with any gun eventually. Since you can shoot well with the Italian Stallion already I think it won't be too hard for you if you play around with it. Good luck.