What I've found makes the most difference for me, isn't the actual barrel length, its the sights, and often the trigger pull. Short barrel guns often have coarser sights, even crude one on some guns, and some have none at all, to speak of. Trigger pull on short barrel "pocket" guns usually isn't the best for fine accuracy, either.
Nor were they ever MEANT to be.
Back before age and "the glorious result of a mis-spent youth" affected my physical ability, I could ring the 200yd gong on the rifle range with about any pistol you gave me, ..eventually. Decades of practice with my 7.5" Ruger Blackhawk made it relatively easy, I thought. With other guns, it would take a few sighter shots to find the right sight picture, and with some guns getting that sight picture (repeatable) was a lot tougher than others.
I've got a Colt Agent .38 snub, which, compared to my Ruger 'Hawks or S&W N frames, the rear sight seems wide enough to drive a truck through. This makes it easier to use fast, but more difficult to use precisely. And I think it would still be that way if the Colt had a 6" barrel instead of the 2.5".
And, don't leave out the trigger. It's more important to precision work than the sights are (to a point, of course). I can shoot "better" using a gun that has poor sights and a great trigger than I can with a gun that has great sights and a poor trigger. (ok, maybe not a lot, but enough to be able to notice
)