This is how I do it. It won't last forever so it requires a little attention after a year or so but it works pretty well. I found that I had to replace the wooden retainer pieces that hold the window in after two years and reseal it once again. This is due to heat and cold and the wood drying out and shrinking which causes the seal to be broken between the rubber and the glass. It's not a perfect solution and it's not permanent. But it works if you keep after it. And after all, trailers need maintenance.
This was a live stream I did a while back so you can skio to the demonstration if you like.