I've always assumed the pagination is on returned results, not pre-filtered data, but if your code correctly handles pagination that wouldn't matter anyway.
Not specific to this call, there can be differences between API-Dashboard, reason vary, it can be a bug.
If you know that specific devices are offline and not being correctly reported, I suggest open a support case with the details,, if it's a bug it needs fixing, if there's some other reason, it would be good to know.
I'd try running the call without any filters, then see how the totals for each status compare to what you see in Dashboard, just in case it's a filtering-related issue.