When metrics such as Clicks or Impressions are pulled from the API broken down on different dimensions (Query, Page, Country, Data, SearchAppearance, Device), the sum of those metrics is not the same as if the break down would not be applied.
In other words: total clicks or impressions are not the same as sum of clicks or impressions broken down on other dimensions.
This data discrepancy is known by Google Search Console and is explained here for different reasons: https://support.google.com/webmasters/answer/6155685?hl=en#groupingdata
To avoid such discrepancy and pull the accurate Total for Clicks and Impressions, the report needs to be pulled WITHOUT any dimensions provided.
In this configuration, it will display one row per Site URL, with the total of clicks, impressions and CTR for each Site URLs.
It is advised to create dedicated KPI for these metrics (Total_impression_gsc, total_clicks_gsc) to avoid confusion into destination.
When still willing to extract data with breakdown by date, query, page or else, create a second complementary stream that pulls the data with the desired breakdown.