Is it possible to use a promise function after InsertRow to await for formula updating for shifted rows.
Spreadsheet’s math works in a sync. mode, which means you can just place the necessary code in the next line
insertRow();
getDataFromSpreadsheet();