If anything a shorter barrel is more accurate. At least in theory. The stiffer barrel is more accurate. If they are the same diameter, shorter is stiffer. In reality there isn't going to be any measurable difference.
You do give up a tiny bit of velocity. Most bullets remain stable as long as they are supersonic. When they slow and pass through the sound barrier they begin to become unstable. My 18" barreled 308 shoots the same ammo 50 fps slower than my 22" 308's. That means the 22" barrel will remain supersonic out to about 1000 yards, the 18" barrel 20-25 yards less.