I have both a Glock 20 in 10mm and a Glock 23 in .40 S&W plus a .40 S&W barrel for my Glock 20.
The 10mm round is as accurate as the .40 S&W if you can manage the recoil of a high power pistol cartriage and you and you can grip the longer grip well. My recommendation is if you can rent both and they both "feel" reasonable to you, pick up the Glock 20. If you want inexpensive ammunition for practice shooting, pick up a .40 S&W conversion barrel for the Glock 20 and you can shoot both.
Any 10mm can be loaded to .40 S&W specifications, the 10mm just allows higher power when desired. A 10mm can also be used for hunting medium game in many areas that restrict hunting to shotguns and handguns (recommend a 6" "hunting" barrel)
If the Glock 20 doesn't "feel" right or it feels like it's slipping in your grip when it recoils, you might be happier with the Glock 22.