I used the FOLD-A-COVER here. This also gives me a tool box just behind the rear window. Everything folds up behind the rear window and works well with the 5th wheel hitch.
When not using the the 5th Wheel it covers the whole bed and is lockable...

You can do something like this and it all closes up and locks when not using the fifth wheel..

I have moved my hard plastic folding bed cover from two trucks so far... The company sells repair kits for the rubber seals etc. I got my original one in 2004... Still using it. Replaced the rubber seals once. Always dry as a bone inside the truck bed when closed up...
Roy Ken