Either will make a good pistol. I like long slides personally. I can’t really think of a competition that a 10mm would make a good choice. Either way you probably can’t go wrong.
I use 10mm in GSSF competitions. A 20 in the Heavy Metal division, and a 29 in Major Sub-Compact. the G40 is limited to the “competition” and unlimited divisions and I see no value added using it over a G34.
Outside of that, I’m not aware of many applications for it in competitions. Maybe bowling pins.