After upgrading to ArcGIS Enterprise 12.1 we have a few layers that no longer filter correctly but only when viewed in web apps. What happens is only the first 2000 records are returned and then no further query requests are made to the service.
The only common denominator that I have found is the problem happens with point feature layers with data stored in a feature dataset that participates in branch versioning. If editing and version management are enabled the filtering works correctly. If those two things are turned off, then filtering does not work correctly.
The problem is further complicated by the fact that it does not happen with every field that I try to filter. Some work and others do not. It happens more with fields that have coded domain values. These services and filters were working just fine in ArcGIS Enterprise 11.5.