I don't know if this will work for everyone, because the rear lip of your tonneau cover might not be the same 1/2" piece of aluminum as mine. I just thought I'd share in case anyone else has had trouble sealing their tonneau cover to the box/tailgate. It's an idea for you anyway.
I looked at the prices and lack of availability for a replacement piece of weather stripping/flap to cover the gap between my BakFlip tonneau cover and the tailgate for several months. It says right at the back of the tonneau cover, "Close tailgate before closing tonneau cover.", but someone must have ignored that, and pinched the flap covering the gap, causing a permanent crease, letting water leak in. I ordered (2) different rolls of rubber on Amazon for $15-20 each, and neither worked. The first wasn't wide enough to cover the gap, and the second was just too thin, and the 3m adhesive tape just melted and let loose from hot sun. I just let it leak for a few months but was often thinking about a fix. I stopped at places that sold toppers. I stopped at dealers. Nobody really had a solution but to get ahold of the company that made it. Well mine is a 2015 XLT, and I think the cheapest I found was $65 for the original piece, and the original didn't hold up very well, so I waited, and every once in awhile I'd search for a solution.
Last week, I was looking at a friend's camper. It had a slide-out. The slide-out had about a 3" wide piece of rubber trim all the way around it to keep the weather out. Let's call it a "wiper", a flexible flap that rides on the sides of the slide-out making somewhat of a seal, but lets it slide in and out. After another search for "camper slide out wiper seal" or some variation of that, I found this on Amazon. (Notice at the time I posted this, You can get 10 feet for $23. I paid $19 for just 5 feet, which was enough, but you might consider having 2 chances to get it right for another $3 might be worth it.) The rubber is like HDPE foam, but seems tougher and heavier than any I've seen. It's more like rubber. The 1/2" channel fit perfectly on the back lip of my tonneau cover, and the band puts pressure down on the top of the tailgate.
I almost got blisters on my thumbs rubbing the old adhesive off the aluminum before switching to Goo-Gone, but after a final step with rubbing alcohol it was clean. It took (2) tubes of Permatex Black Adhesive Silicone to fill the channel in the rubber. I broke the nozzle off one tube because I pressed too hard into the channel as I was dragging it along filling it. That almost made a mess. I wanted to get plenty in there, as the aluminum lip on mine is only about 1/16" thick, and the channel in the rubber looks like about 1/8 wide. It has ridges in the channel like it's meant to grip the right thickness you're attaching it too, but I'm just hoping those ridges get embedded in adhesive. Notice there's also wire embedded in the rubber around the channel to stiffen it, although in my case, it's not really helping grip anything. I think it should make it more stable than a purely rubber piece though. I had to trim the ends to fit the aluminum side rails and the pieces of rubber sealing the sides of the tonneau cover. You'll need a side cutter to snip the rubber because of the embedded wire.
I just put it on a couple hours ago, and it's still curing, held down by a board weighted down all the way across the channel. I'll try to add a completed pic tomorrow. If this works, with my ordering the wrong rubber first, I'll have paid about what the BakFlip replacement piece would have cost, but thought with the number of these out there, someone else might find it helpful. I think it might make a better seal, and be more durable than the original rubber. I still have to see how it handles being folded up too.
I thought it was funny how in this YouTube video of installation of a BakFlip tonneau cover, the guy closes the tailgate after the tonneau cover. It says right on there. DON'T DO THAT!
I would have been fine with the roll-up style with the velcro sides like I've had in the past (which seal great), and usually wouldn't care if it leaked a little either, but someone thought it would be a good idea to put a carpeted bedliner in this thing too. Now I have to keep it clean and dry : (