The ENTER key is used both to submit the command and also to end dancing. Most of the time the server doesn’t detect you pressing ENTER for submitting a command but sometimes it does. When it’s happened to me before I just smash ENTER a few times and it seems to fix it.
But I’ll add a grace period.