This behaviour is by designed for now. Sometimes the layer contains large number of features which can't be totally retrieved by the client app. So it's actually not the whole layer used for query. By limiting features, it would execute the query more accurately. But it's not a good UX.
The enhancement of having a default option to avoid the prompt message is in the dev plan. If you have any suggestions, please let us know.