They certainly can be.
My little G30 will regularly outshoot most long barreled guns, I proved this again both during and after a class recently.
My old G21 was a pig, 4″ groups at 25y were all it could manage, but it was a consistent 4″. No matter bench or offhand, who was shooting, or what ammo, it shot 4″.
The G30? Lets just say that milk jugs at 75y are not safe. I made a second round hit on a Stetson sized rock at 220y, when a customer went 0 for 6 with a 7.5″ Ruger. And he is no slouch as a shooter.

Much has to do with barrel lockup and dwell time. The little Glocks for example stay locked up just a touch better and longer than their larger bretheren. The new Gen 4 guns, they are a great improvement over the earlier guns, accuracy wise thanks to the new recoil system.

Ammo becomes the big variable, some guns prefer one load, while another prefers another. My first G21 absolutely hated Winchester ball ammo, spraying it across the countryside but shooting Federal ball into nice tight groups.

In general I will say that mechanically, most of the time, most short barreled guns are no less accurate than longer barreled guns. But I will also agree with the statement that its easier to be accurate with a longer sight radius.