Barty crouch jr stayed with harry for the whole year , he could have been the one to end up impersonating him, or could have just stayed as mad eye and helped worm tail become him, cos otherwise mad eye would have just disappeared,  what was bartys plan with mad eye , he cant stay as him forever