'64-'66 Abody Cowl-How did Factory Make it Water Tight?

We drilled away all the welds on the '65 Formula S cowl, removed the cowl. made various rust repairs, and now it's time to re-attach it. Using just spot welds, it seems to be it will be leaking here and there.

How did the factory waterproof it?

How does the crew here (who have experience) re-attach and seal the cowl?

Thank you.

View attachment 1715239845
The factory used a type of foam sealer that went between the spot welded flanges. There must
be some product sold today to duplicate it. Check with automotive paint stores. Since most DIY's
don't have a spot welder it will most likely be plug welded.