I've read before that this happens whenever Windows' Device Manager is refreshing device drivers, because FFXIV completely loses contact with the controller when this happens. Sadly, I can't think of any work-around for it, unless there's a way to disable Device Manager refresh while you're playing.