The OEM 3rd brake light on my 97 Tahoe had a black plastic gasket. The replacements no longer come with one(even from the dealer). I first purchased the Dorman which had some type of sticky caulking on the bottom, it leaked when it rained. I then purchased an OEM light and it too came with a bead of caulk on the bottom but was much thicker than the Dorman. It also leaked until I added additional caulking and reinstalled it. My advice is to hang on to the original light and reuse it if possible. If not, you should be able to reuse the factory plastic gasket. Mine was tossed by accident when I stripped the car for paint.
I just realized after reading the entire thread that you’re using this on a topper, not a truck roof. In that case, it’s a bit less critical since any water that may drip inside really wouldn’t hurt anything unlike a fully carpeted Tahoe or Suburban.