roof rain gutter finishing?

Hello, Getting ready to paint the roof of my car. Rain gutter seems to always be an issue with rust buried under paint and primer from previous owners. I grinded out the rust and paint and primer down to the bare metal because I do not want to start having issues with the new paint. What should I seal that interior with so water will just fly down there and not get to the seam where the roof sits. Did the manufacturer use a seam sealer there and how did they get it smooth to accept the primer and paint.