I'm sorry, I read your question was about the leaking back window. My bad.
About the tonneau cover, if you are leaking at the front cab corners, double check your front gasket seal at the leading edge of the box. Sometimes the seal is not all the way across, or, since your truck is a 2019, look at the front seal and see if its shrunk, or lost its pliability so that water can get it, around the gasket edges