This is a US/USPTO answer.
It is not clear what the situation might be. I have seen a case where original independent claims were all canceled and new independent claims submitted and the examiner declared a "restriction by original presentation" or similar words.
A restriction is properly issued when the initial claim set contains claims to more than a single invention. The criteria is actually more complicated than that but the idea is that you have paid for one examination and to search and react to all of the claims would be more work than you have paid for due to more than one invention claimed.
In the case where I received the restriction by initial presentation the examiner was saying that the claim set that was searched and examined was different enough from the new claim set such that, had they been presented together, I would have been forced to chose one of the other. And I had implicitly chosen one already. If I wanted to proceed I would need to file a continuation examination of some type. New fees.
A way to treat this is to go along with the idea and argue as you would argue if it was a restriction requirement between the two claim sets. You ask what is too distant? The answer is in the MPEP. 808.02 Establishing Burden This is the criteria they should use and the basis for an analysis you can try to turn on them.
(A) Separate classification thereof: This shows that each invention
has attained recognition in the art as a separate subject for
inventive effort, and also a separate field of search. Patents need
not be cited to show separate classification.
(B) A separate status in the art when they are classifiable together:
Even though they are classified together, each invention can be shown
to have formed a separate subject for inventive effort when the
examiner can show a recognition of separate inventive effort by
inventors. Separate status in the art may be shown by citing patents
which are evidence of such separate status, and also of a separate
field of search.
(C) A different field of search: Where it is necessary to search for
one of the inventions in a manner that is not likely to result in
finding art pertinent to the other invention(s) (e.g., searching
different classes/subclasses or electronic resources, or employing
different search queries, a different field of search is shown, even
though the two are classified together. The indicated different field
of search must in fact be pertinent to the type of subject matter
covered by the claims. Patents need not be cited to show different
fields of search.
Where, however, the classification is the same and the field of search
is the same and there is no clear indication of separate future
classification and field of search, no reasons exist for dividing
among independent or related inventions.