The grip is massively wider on the S&W at ever point and classically flat at the bottom where a rounded bottom conceals better, for me.
Without knowing what you might value, it's a point to know that doesn't translate on paper dimensions.
I have multiple P365s and none have let me down. I expect the M&P would be similar, but the size just isn't for the same purpose...even then, the P365 does a lot that "compacts" do just as well. The curved trigger on the P365 doesn't leave a whole lot of "more" to ask for.