This might have already been resolved, but I've had bad experiences w/ long trim and a (long bed) pickup prior to my Raptor ... hit a bump, and literally blew up about $150 crown molding over the top of the tailgate. ******* mess.
Since that day, I've done this (link):
Basically a slip knot w/ the ratchet strap at the tailgate end, and then a 2x4 brace at the top of the bed supported by short 2x4 vertical brace towards the cab (keeps the lumber from pogoing). If you're only grabbing a piece or 2, prob overkill ... but if it's a bunch this is good. I also add that if you're transporting flimsy lumber or molding ... I've got a spare longer 2x4 I keep around to act as a support and then strap the flimsy pieces to the 2x4.