I retract my bad advice which was based on a passing thought.

I've only once been in a position where I was quitting and was offered a counteroffer. I was rather uninclined to take it. (And didn't.) But that was for other reasons.

Cheers,
Ben