Is no true Scotsman always a fallacy?

The no true Scotsman fallacy is inherently fallacious when used to arbitrarily dismiss counterexamples that disprove a general claim. However, arguments that look similar at a glance aren’t always fallacious. The soundness or fallaciousness of the argument depends on the nature of the claim and the definitions involved.

If a claim is made about a category based on well-defined, objective, and agreed-upon criteria, then refining a definition to exclude a counterexample that doesn’t meet those criteria typically isn’t considered fallacious.