When that happens, just quit and close.
Then you can either ignore the villager until they actually move, or you can try again until they don't change their mind.
To prevent the same thing happening, when he asks to move out, you TT to move out date. Whether you're good enough friends or not doesn't affect their probability of changing their mind.
Actually, if they ping you to leave and then they change their mind, you can close your game and reload.
They will still leave even if they don't ping you.
You could try a TT'ing method or become good friends with them since the game wrecks havoc for friendship