Ps sliding your seat back in the rails is fine to do, I have done this with bikes, with no problems.
The opposite, sliding forward to reduce reach to bars, is generally not good for the knees.
I have one knee that can be a bit sensitive, but seat slid back has never caused issues, the opposite however has in the past before I knew better, when I pushed a seat all the way forward for a bike a bit too big.