Good luck finding ammo now.
.40S&W can be pricey and with the reelection, prices will go up even more.
Just something to consider.
I really have nothing to help you decide.
I had a G27. Wasn't really any more easily concealed than my G19, ammo was expensive, and the recoil was unpleasant, so I sold it.
Nothing wrong with 9mm with modern ammunition. Nothing wrong with .40S&W either so long as you know why you are choosing it.