Google Search Console API not returning all the results

Solution for Google Search Console API not returning all the results
is Given Below:

I am trying to get stats for all the pages in my domain in June.
When I execute the following request:

        request = {
        'startDate': '2021-06-01',
        'endDate': '2021-06-30',
        'dimensions': ['page'],
        'startRow': 25000 * itr,
        'rowLimit': 25000
    }

I get 22,500 distinct pages out of 22,500 rows in total
But if I execute this request:

        request = {
        'startDate': '2021-06-01',
        'endDate': '2021-06-30',
        'dimensions': ['query', 'page'],
        'startRow': 25000 * itr,
        'rowLimit': 25000
    }

I get 374,295 distinct pages out of 685,331 rows in total.
I can’t understand why I get more pages in the second query. As I understood from the doc dimensions is like group by so what am I missing?