There are different styles, so here's a bit of advice from my experience. I have the so called GM factory bedliner, and it's the one that comes up and over the box rails, supposedly to protect the rails from damage. Despite the fact that the bedliner has been screwed down, it moves a bit, and has worn the paint off the rails. Looks terrible. Besides that, if you ever decide you want a canopy or a topper, you cannot clamp the canopy down without either removing the bedliner, or cutting holes for the clamps.
in my last truck, I had a rubber bed mat, approx one inch thick. Nice and heavy for winter weight, and did a great job of protecting the bed floor, but not so good for the side walls.