Are you getting 2-3 inch groups with other pistols you own except for full size M&P 2.0?
If so, it could be the pistol.
Yes, all my wheel guns except the 642, the 1911s both FS and commander, and my glock is an absolute tack driver out to 40 yards, where if i do my job, 3 inches is very possible.
OK, then we can suspect the pistol.
S&W had issues with 9mm M&P accuracy and tried different slower barrel twist rates (1:18, 1:24) before settling down with current 1:10 -
https://smith-wessonforum.com/smith-wesson-m-p-pistols/292369-barrel-twist-rates-print.html
If your fullsize M&P has slower twist rate, it could explain why shorter Shield barrel with faster 1:10 twist rate shoots more accurate. You could contact S&W customer service to verify your barrel twist rate (1:10 barrels have a dot on bottom side) and switch to faster 1:10 barrel.
That’s a tall order for striker-fired pistols, and likely unrealistic with the Shield.
IMO, a “good” shooter can shoot constant 3”@25, but that’s with a service-sized handgun that’s up to the task.
Talk to enough match shooters who use striker-fired pistols and you will get a different story.
While I agree that "out of the box" striker trigger could be gritty and vague that moves/jerks front sight when dry fired, especially for heavier M&P triggers, once broken-in and smoothed out to where dry firing won't move the front sight, 3" @ 25 yards is very doable.
Before I buy any pistol, I dry fire while watching the front sight and will buy the one that doesn't move the front sight or minimally to get a more accurate shooting pistol out of the box that will shoot even more accurate as trigger parts break-in and smooth out. (I get puzzled look from other shooters with same Glock/M&P pistols as their pistols won't shoot as accurate and I explain why

)
Exception was buying Shield 9mm that was not in stock locally so I had to order online. When I dry fired, trigger was gritty and jerky and move the front sight. I dry fired like around 2000 times until trigger smoothed out to not move/jerk the front sight and group size reduced. Other shooters with Shield 9mm was surprised and I explained new 10/22 factory trigger is around 7.5 lbs and after 3500 rounds, it reduced to 4.5 lbs and smoothed out so I told them to keep dry firing until front sight didn't move -
https://www.thehighroad.org/index.p...rimfire-silhouette-rifle.937915/post-13083234
Even factory stock Glock 22 can produce sub 2"-3" groups at 25 yards -
https://www.thehighroad.org/index.php?threads/i-may-actually-buy-a-glock.915477/page-4#post-12556711
These are from my Gen3 Glock 22 (factory trigger well broken in) load development with Alliant BE-86 -
https://www.thehighroad.org/index.php?threads/40-s-w-powder.851647/page-3#post-11150251
I met THR member
@Dudedog at the range to witness following group -
https://www.thehighroad.org/index.php?threads/40-s-w-powder.851647/page-3#post-11150251
And here's a list of factory stock striker fired pistols that can do sub 3" at 25 yards -
https://www.thehighroad.org/index.p...concepts-and-discussions.778197/post-10940688
Lipsey's Vickers Tactical Glock 17 (25 yards) 1.00" to 1.80" -
https://www.americanrifleman.org/articles/2017/3/23/tested-lipsey-s-vickers-tactical-glock-17/
Sig P320 X-Five/VTAC (25 yards) 1.14" to 1.97" -
https://www.americanrifleman.org/articles/2018/8/10/tested-sig-sauer-p320-x-series-pistols/
S&W M&P9 M2.0 Compact (25 yards) 1.22" to 3.64" -
https://www.americanrifleman.org/articles/2017/11/30/tested-smith-wesson-mp9-m20-compact-pistol/
S&W M&P9 M2.0 (25 yards) 1.33" to 2.36" -
https://www.americanrifleman.org/articles/2017/5/22/tested-smith-wessons-mp-m20-pistol/
Springfield XDM 4.5" OSP (25 yards) 2.46" to 2.80" -
https://www.americanrifleman.org/articles/2017/3/21/tested-springfield-xdm-45-osp-9-mm-pistol/
Ruger American (25 yards) 2.48" to 2.89" -
https://www.americanrifleman.org/articles/2015/12/29/tested-ruger-american-pistol/
Walther PPQ M2 Q4 Tac (25 yards) 2.53" to 2.76" -
https://www.americanrifleman.org/articles/2018/1/19/tested-walther-ppq-m2-q4-tac-9-mm-pistol/
More pistol reviews and 25 yard groups at link.