<Box sx={{ height: 336 }}>
  <DataGridPro
    {...data}
    loading={loading}
    slots={{ toolbar: GridCustomToolbar }}
    slotProps={{ toolbar: { syncState } }}
  />
</Box>
<Box sx={{ height: 300 }}>
  <DataGridPro
    {...data}
    loading={loading}
    initialState={savedState.initialState}
    key={savedState.count}
  />
</Box>