AI controlled player character

Hi, I have about the same problem in my game. By following the advice given here I managed to make my player character possessed by an AI controller when the player is afk for a while and when he is not afk anymore, that is when the player moves the mouse or presses a key on the keyboard, the player regains possession of the player character.
However I would like the position and rotation to be the same, currently my AI controller moves the player character along a spline but when I regain possession I return to the initial position where my player character was before being afk, I don’t know if I’m very clear.