As you mentioned, the rubber just uses pressure to hold the rail in place. The rubber dries and shrinks over time and the rail slides off. Replace the rubber with the VHB tape. You may need to find thicker tape or double it up.
If you decide to use windshield urethane adhesive, you'll need to apply a pinch weld primer to the rail and prep the glass with an etching primer. The glass also needs a special primer.
2019 Rockwood 2902WS
2019 Ford F250 4X4 CCSB 6.2/4.30
Equalizer E2 with single old-school friction sway control.