The server will register slightly before the cast bar finishes, at around 75-80%. The upside to this is that with many (not all) boss mechanics, you can move back immediately after and be safe even if the animation hasn't finished.