Yes, if they don’t like where you place them. They will find their happy place and most likely never move again. I had one stay in the same spot for 2 years till I changed lights then he moved to the back of the rock face and stayed there the rest of the time.
The one that left the rock, was he moving in/out of flow or higher/lower in the tank? Take their cues. If he was trying to get to that perfect spot (and you obviously don’t want him on the glass) there’s no harm in taking their cues and moving them. They are hard to move from rocks/things they can squeeze their foot into but glass and sand are easy to pluck them off and move them to a place that’s acceptable.