I would make (or buy) a bed extender. I made one years ago for my old midsize pickup. It was reversible, so it sat on the open tailgate and kept gas cans/gear from falling out when hauling my dirt bike, and fit under the tonneau to keep things from sliding. There are dozens of variations if you search "bed extender" on google. Here is an example, if you open the tailgate, if will flip 180 and enclose the length of the tailgate.
image.jpg
Bill