Could be wrong but this sounds pretty similar to some of the macro/automation issues that have been discussed recently and are hopefully being addressed in 10.2
https://us.forums.blizzard.com/en/wow/t/automation-auto-kick-auto-grounding-ai-vs-rated-pvp/1672291