This is known as the "No true Scotsman" logical fallacy.
This is a logical error where someone tries to protect a universal claim from a counterexample by changing the definition of a group rather than admitting they were wrong.
Ususal example is with an Initial Universal Claim e.g., "No Scotsman puts sugar on his porridge." Then someone presents an actual member of the group who disproves the rule (e.g., "My uncle Angus is a Scotsman and he puts sugar on his porridge."
The Fallacy: Instead of accepting the counterexample, the speaker arbitrarily redefines the category to exclude them e.g., "Well, no true Scotsman puts sugar on his porridge."
For rational, non ideologically-driven people, it is clear that this is bollocks and actually the initial universal claim is untrue.