Moving the goalposts is a metaphor that denotes unfairly changing the rules after the game has begun.