Your next pocket travel guide
Upvote:1
This video of how to transfer between Terminal 4 and Terminal 4S seems to indicate that yes, you would clear passport control before boarding the train (see 2:02 in the video).