I've used silicone spray but it doesn't last long. I might try using silicone gel but I don't like the idea of having something that can attract dust within the track and turn into wet sandpaper.
I use a block of my wife’s canning wax in the channel of our sliding doors, for the outside screen door. I slide it back and forth to get a coating of wax in the channel. It works great and stays put for a long time.
Hum, I need to re-do a couple sliding windows.
I last used a used bar of soap because I did the bathroom window and the soap was right there. Of course I used the wife's soap. Saved mine and didn't have to go in the garage to find something else.