Recently in one of our requirements, while trying to fetch contact records using Fetch XML Query
we realized that we can only retrieve / fetch 5000 records.
Enabling pagination will also not help here (the Next link also come as null).
The alternate solution is to convert the Fetch XML query to OData and use the same inside List records action
Get more details here
Hope it helps..