iamivanwilliams, I made a very similar decision recently. I have been carrying a Glock 19 for a few years at my PD job and was wanting something else. I went with a full sized M&P 2.0 in 9mm. In your case, if you want something the same size as your G23, and in the same caliber, S&W does make an M&P 2.0 Compact in .40. As was already posted, same overall size, same mag capacity.
Myself, I LOVE my M&P. I have been shooting various Glocks for years and, the first time I took my M&P to the range, I shot better with it than with my G19. To me, it fits my hand better than my G19, the trigger is better than my G19 and it recoils less than my G19, although I don't know how much of that is because the G19 is a compact and my M&P is full sized. Overall, I REALLY like my M&P and, when we go out in the fall to qualify, I will be ditching my G19 and carrying my M&P. It will pair well with my older Shield 9mm that I already carry off duty. Now, I just have to come up with something to replace my Glock 42 for backup and very occasional low profile off duty carry.
Myself, I absolutely despise .40, so the caliber choice would be easy for me to make. However, consider this. With all the advancements in bullet technology over the past 20 or so years, 9mm is a real contender now. Bullet technology has advanced to the point that 9mm is now roughly equal to .40 and .45, AS LONG AS you use GOOD defensive ammo, like Federal HST or Speer Gold Dots. Yes, because I know that the comparison will be made, .40 and .45 advanced, too. However, 9mm seems to have advanced more. .40 and .45 may expand a very small amount larger and there are some arguments that .40 is better through auto body panels and glass, but for typical CCW use, 9mm is a very good choice. You typically get a few more rounds in the mag, 9mm is easier on guns than .40 and 9mm recoils less than .40, which means quicker follow up shots. In the end, only you can decide if you want to change calibers, but just be rest assured that if you do, you really aren't giving up much of anything to go to .40. Good luck with your choice.