In my computer environment, if you execute the above code on the selected token, the token will be moved to the Grave map, but the token will remain in the current map as well (It moves to specified coordinates on the current map.)
The reproduce method is as follows,
1. Create a new Grave map.
2. Prepare the token in another map.
3. Enter the above macro in the button on the macro panel, check "Apply to Selected Token", uncheck "Allow Players to Edit Macro" and make it executable.
4. Execute this macro for the prepared token.
5. The token becomes Dead status and moves to x1, y1 coordinates on the current map (the token does not disappear
6. Looking at the Grave map, the token with Dead status is present at the x1, y1 coordinates.
In other words, if you use moveTokenToMap, the token is supposed to disappear from the current map and it should be moved to the specified map, but it will be present in either map.
If [h: setState ("Dead", 1)] is deleted from the above code and executed, the token does not remain in the current map and moveTokenToMap works correctly.
I am sorry I can not explain it well…