I have the similar issue.
I found the problem is at the REST API level when querying a ArcGIS Server Map/Feature Service with a spatial filter.
If the resultOffset and resultRecordCount are not set, it returns all the matching records, if they are set the query returns wrong number of records. for example, if the resultRecordCount is set to 500, it only returns 36 records with exceededTransferLimit=True.
This issue should affect all the other APIs that wraps the REST API, such as Javascript API, Python API, ArcGIS Runtime SDKs...