If you want a 50yd gun, you really should be looking at other platforms.
+1. FWIW for sheer accuracy in a larger centerfire caliber, revolvers offer better "bang for the buck" than most semi-automatics.
The issue is that most centerfire semi-autos use what's known as a locked-breech or short-recoil action; in other words, the barrel and slide recoil together for a short distance, then the barrel unlocks from the slide, usually by tilting downwards, and the slide continues rearward before reversing direction to reload the chamber. In order to ensure reliability when the firearm is dirty, some clearance is required around the moving parts, which hurts accuracy because the barrel and slide don't always come to rest in exactly the same position from shot to shot.
Handguns designed for military service- such as Glocks or the Beretta 92- tend to be built with extra-generous clearances to handle extra helpings of mud, sand, and powder fouling they may encounter in the field. This makes them less accurate.
The easiest way to eliminate this problem is to rigidly fix the barrel to the frame- as in a revolver. This approach is also commonplace in small-caliber semi-autos, but it doesn't work well in larger calibers because an unreasonably heavy slide and/or outrageously stiff recoil spring would be required to handle the extra recoil.
The other way to handle this problem is to build a semi-auto with unusually tight and precise clearances. This sacrifices reliability in the name of accuracy and also increases the price because painstaking hand fitment is usually required. This is why high-end M1911s cost $1,500+.
FWIW the most accurate centerfire handgun available for the approximate pricetag of a new Glock is IMHO either a S&W Model 14 (aka K-38 Masterpiece) or a Colt Officer's Model Match in .38Spl, in very nice used condition.