Getting results with duplicate sort values when searching with _doc as the sort field

I wish to understand what exactly happens when one uses the _doc field for sorting while doing a search. I have an index on 4 shards and when I do search operation on it, with _doc as the sort field then I get different results, some with duplicate sort values.

This impacts the results fetched with search_after param as the docs with duplicate sort value are skipped if we set the search_after parameter with the sort value of previous batch's last doc's sort value.

Is this due to the fact that the sorting with _doc just lead to getting the results as per when they were index and thus the docs which were indexed in bulk request are likely to have the same sort value? If not what is it?