Didn’t the Spanish used to make a pistol that would shoot all the 9 mm rounds?
Pistola Modelo B comes to mind. Often called a “garbage gun” because it would shoot all the various 9mm, Largo, Kurz and other cartridges.
The Spanish Astra 400 was commonly chambered for the 9x23 cartridge. Some models were stamped 9mm/.38, and would reliably fire .38 auto cartridges as well. It should fire and cycle the various 9x21 cartridges. A friend said his would reliably feed and fire 9x19, and while .380 auto (9x17) would not cycle the action, they would reliable feed from the magazine and fire, if hand cycled.
I like the pistol. They are fairly accurate. But, by today's standards, they are heavy, complex, and only hold 8-9 rounds.