So, while not sending a query to a shard which will return no results is logically ok, there is an issue with it. TopDocs.merge merges TopDocs and part of the process is to compute a totalHitsCount, so that the merged TopDocs.totalHits is the sum of all shards' totalHits. Now, imagine that we didn't submit a query to a shard with no more results, then what would happen is that the previous search would return mergedTotalHits=N and the follow-on search (e.g. clicking 'next') would return mergedTotalHits=N-K, where K is the totalHits from the shard that we omitted.
Fixing the test is not easy unless we cache somewhere the totalHits from the previous round. And I assume an app will need to do that too if it wants to omit a shard from a search. But this looks unrelated to this issue, i.e. it's some sort of optimization that we need to put somewhere, maybe searchAfter should also record totalHits for that shard, I'm not sure. But it's unrelated to this issue.
So I think at this point it would be better to fix whatever collector that is sensitive to searchAfter exceeding maxDoc, than to fix IndexSearcher to fail fast.