I discovered that the problem occurs when I restore the server database from backup and before any change has happened on the database.
So the simple solution was that after I restore the database from backup I just go and update any column of any row in any tracked table and that fixes the problem!