I've had this happen a couple times, sometimes with all of my characters. I use the /target focus /assist /cast <whatever> method.

It seems to be an issue when switching targets quickly, what I've done is add a stopcasting button, and if I think they're not targeting the right thing, I start casting, hit that, then resume casting.