I have run into the same issue on Dragoon while running dungeons. Given how much melee have to move in boss battles this poses a big problem.

I also notice a red circle appear on enemies like I'm cycling targets. I wont be able to attack while this is occuring and have to hit ESC and re-target. Very annoying. I have not been able to identify what this "cycle" is in the keybind or options to turn off.