The first thing I would do is to check the most used runways on the airports you will be flying and then use suncalc.org to determine exactly the sun position and which side of the aircraft you want to be, of course it can be a hit or miss in some airports. No sun going directly into the window (even if only slightly) will eliminate almost all the reflections on daytime, except for the ones from inside, in which case you can use something to block the light.
For reflections at night, I use a rain coat or a jacket to block them. Chances are someone will look at you like you’re crazy, but its worth for the pictures
If the window is dirty and you’re on the correct side, try to use the biggest aperture as possible, sometimes it can minimize the effect on the photo. Aside from that, 99% of the time you want the camera as close as possible to the window and can also try to find the best spot.
Good luck with the windows on the next flights.