What you describe is as expected.
As soon as a new controller - in this case, the player - possess the character it will no longer have any association with the previous controller - in your case, the AI.
You will need to manually destroy the AI at some time.
If you don’t need the AI once the player possesses the character, just destroy it then.
Otherwise, keep track of it in some other fashion, such as a variable on the character itself.