I encountered the same issue while implementing server-side sorting on a date column. The problem arises because most relational databases cannot guarantee a consistent order when multiple entries have the exact same value in the sorted column. As a result, the backend may return duplicate entries, causing AG Grid to display inconsistent or repeated rows.
To resolve this, I added a secondary sort by id at the lowest sorting level. This ensured a unique and consistent order for the entries, which solved the problem.