It's probably lag. Like you start casting when the server is still updating your position and thinking you are still moving.