If the weather is changed from sandstorm when the move erode is used, the user will still move first. This seems unintended as similar interactions e.g grassy glide in the mainline games don't work this way.
E.g on turn 1 of a double battle with sand up, player 1 switches a pokemon into drought torkoal while player 2 clicks erode - player 2's erode will still move in a higher priority bracket