If you understand that a G21 is the same size externally as a G19...................you don't understand. The G19 and the G23 are the same externally and are chambered in 9x19 and 40S&W respectively. The G21 is larger in all dimensions, sharing those dimensions with the G20, chambered in 10mm. The G21SF, for short frame, is still larger than a G17, which is the model it would correspond to.
Penetration is a complicated subject, going far beyond caliber alone, or even muzzle velocity and caliber and bullet weight. Think hollow point design and the counter intuitive notion that more velocity means less penetration (sometimes).