Is there a way to prevent sliding window from freezing?
My suggestion would be to pull out the window and clean everything really well to make sure nothing is gumming things up.  Then I would use a clean rag and wipe all the areas where the window contacts the frame with a good quality silicone lubricant.  A little goes a long way with silicone lubricant, you don't need to saturate things with a direct blast.  I would avoid wd-40, or other cheap oil sprays, it could make things worse.