Contrary to popular belief, every sun roof leaks, hence drain trough and tubes. The key to sun roofs is water management. You want as small a gap from roof to glass to minimize the leak, and keep it smaller than the drain capacity. So as long as more water can exit the tubes than leaks past the gap, no leak.
Open the roof all the way. Climb up in the door opening so you can look straight down at the opening and you will see a plastic "gutter or trough" that goes around the perimeter of the roof opening. The drain tubes are attached to the gutters in the four corners under the headliner. Take a paper soda cup and squeeze it into a funnel and slowly and carefully pour about 2 oz of water into the gutter near the front corner of the roof. Watch the inner fender and the water should exit there within a few seconds. If the water hits the ground quickly, pour another 6 or 8 oz in slowly and make sure it hits the ground quickly again. If little or no water comes out be careful as you will have it coming out of the grab handle. Do the other front corner, same thing. The rears are a little more difficult as the truck generally has a little rake that will tend to take more water forward than back. The rear drains will exit between the cab and bed, and they have a little "flapper" that slows the volume of water that can exit compared to the front. Sometimes the flapper sticks shut.
So little or no water out quickly, pull headliner down as necessary to clear the tube(s) of debris.