There are a variety of manufacturers that make toolbox/chest that sit on the floor of the bed and are flush with the top rails.
such as this one
https://www.deezee.com/product/red-label-fifth-wheel-utility-chest-black/
or here are a couple other styles
https://www.pickupspecialties.com/toolboxes/Unique/5th_wheel_fifth_wheel_tool_boxes_unique.html
I have a headache rack on my truck and chose to do a shorter rv style (like the third picture in the second link) that sits on the floor but I wanted the bed space so I fabbed a frame out of unistrut that I attached to my headache rack mounts and my shorter box is up off the floor so I can still haul long things on the bed floor or put smaller things under it yet it is flush with the bed rails.
There are many manufacturers and quality levels. Previously I had a Dee Zee box in my old truck that is still going after 15 years. The new truck is sporting a Pro Tech box. While definitely nicer than the DeeZee ever was it was also twice the price.
2016 Jayco 28.5 RLTS