Trailing spokes on the inside of the flange (heads out) gives the spokes that are most transferring torque a lower approach angle at the rim and the flange. This reduces the out-of-vertical forces exerted on those components when under torque.
Only to a minor degree though. In practical application, it doesn't matter that much.
FWIW, on my disc brake wheels, I lace the rear with the trailing spokes inside the flange (heads out) and opposite on the front, since the torque applied up front is, well, opposite.
__________________
Good night...and good luck