The query result changes in remote and local database
It might be that there is an unenforced (ie, informational) constraint on the table. Those may cause the optimizer to ignore the data that violates that constraint. Here is a good blog post about that.