Most power boats have a similar "rub rail" along the edge of the "gunnel"....that is where the deck and hull are
pop riveted together !! The aluminum moulding accepts the rivets which are hidden by a rubber filler piece.
Our coaches have a similar "roof" to "side wall" joint. On power boats this "joint" "works" and is a very common failure point leading to leaks and stressed fibreglass.
Two solutions come to mind.
1) Clean under the aluminum strip thoroughly a section at a time; add caulking to the underside of the aluminum strip, if possible, provide a backing piece (wood or aluminum) inside that will accept the screws, liberally coated with a marine caulking, wherever you can access the inside of this joint. Do NOT over tighten these screws or you will squeeze out the sealant and stress the fibre glass . Whether you use a backing piece or not do NOT over tighten the screws. Once you start to see sealant oozing out, it is time to stop. If you use Sikaflex 5200, you will create a very strong bond. Cleanup with a spatula and acetone before it cures. Once cured, you can replace the rubber filler strip .......I would use a good sealant to hold the ends in place. You could slightly "crimp" the moulding, to achieve the same effect.
2) bond the roof and wall together by laminating from inside, with fibre glass matt and cloth. Not possible unless you want to remove all the cabinets etc. but done at the factory would have provided us with a structurally sound roof to wall joint that would never leak.
Possibly someone can add to this so we can achieve a uniform semi permanent solution.