Junker, a good official will move to the spot where he/she has the best look at the whole play. If that means move off the baseline (especially in 2-whistle), then that's what you do. No hard and fast rule for where to stand in this situation. If the ball squirts out toward the endline, then you move back (quickly!) to the endilne to see if it goes OOB. Simple as that
Chuck