All other things equal, shorter barrels give better accuracy because they are stiffer. Read up on barrel harmonics to understand.
All things are never equal.
Accuracy should be pretty close. The effects of a "stiffer" short barrel have a marginal effect on accuracy.
The positives of a longer barrel have to do with increased velocity and recoil dampening from the greater weight. Given this is a pistol caliber those gains will probably be relatively marginal as well.
There might also be a slight advantage with a longer sight radius.
I'd suggest picking barrel length, in this case, on how the gun feels.