In front you want a couple inch gap or whatever it takes to keep it from contacting the front of the bed. If the bumpers don’t work shim it with boards or whatever.
But no need to shim it tight to the sides. Although if you do, block it against the wheel wells but not tight.
2016 Ram 2500, MotorOps.ca EFIlive tuned, 5” turbo back, 6" lift on 37s
2017 Heartland Torque T29 - Sold.
Couple of Arctic Fox TCs - Sold