I tried this and it works!

"There is a simple way to make sure this doesn't happen. You need to cast a spell once you've left the AOE's area and the sever will register your new position. The moment you leave the area start casting and you will never be hit."