Happens to me all the time as well.

I just press G twice quickly whenever it happens and it "reactivates" their AI brains to continue following.