The distance I am shooting is 45' the spread is sometimes as much as 5" to 6"
If it's not shooter error, then that's pretty bad. My gun shoots like that (actually worse than that at times). Short story is that I sent it back to S&W, I called them to check on it, they told me that it was "within spec" and that they were going to send it back to me. I asked them to check it again, they said they were sending it back to me, and that if I found it to still be an issue then I should return it back to them again. Pretty asinine if you ask me since (1) they didn't do anything to it and (2) they still were in possession of the gun at the time. I didn't bother sending it back a second time.
I would recommend you try a sampling of ammo weights. Try bench resting again. If you can get groups at longer distances, that would be good as well... however if you're getting groups half a foot across at 15 yards, it's probably unnecessary. Just to pacify the naysayers, do some dry-firing from the rest before live-fire to make sure the sights are staying stable. It is usually preferable to rest your body instead of the gun... that being said, I find that resting the gun sometimes tends to shift POI but doesn't usually open up groupings.
When dry-firing, pay very close attention to see if the front sight jumps left or right when the striker releases. If it does, see if you can determine for certain that it's not shooter input. Your gun has (1) an overtravel stop and (2) a lighter and less gritty trigger pull, so it should be much easier to firing the gun than with a stock base model. I notice that, due to side-to-side slop between the frame and slide, that there is play that happens from either the momentum of the striker or release of tension between the sear and striker. This is secondary to the "early unlocking" issue. I was seeing maybe half of the shots go about where I called them with the other half spread out all over the place... some of the groups were in the 12"+ range at 25 yards. Shoot 10 round groups from the rest... since there is so much variation in shots, I needed to shoot more rounds. If I only shot three round groups, it's possible based on dumb luck that the three rounds might be relatively tightly grouped. The fourth one might be 8" away.
Are you shooting with a red dot? If so, make sure it's cranked down tight.
If you've done all this and your gun is still shooting flyers, you will have a decision to make. Even though my experience was poor, I would suggest giving S&W a shot at making it right.