Driveshaft critical speed is what determines the allowable shaft length.
Critical speed (the point at which the shaft bends and starts swinging like a jump rope) is a function of shaft length, diameter, material and rpm (which is a function of vehicle top speed and rear axle ratio). Plus - if there is some odd system resonance that the shaft is responding too that can cause problems.
This is why trucks that are somewhat similar might have a difference between one piece and two piece. Could be the same truck but with a different rear axle ratio, for example, that drives the different release.
K