Workflow issue whit Google Drive updating specific sheet

Hi all,
my workflow retrieve data from db, delete rows on specific sheet and then append rows in the same sheet. I am trying to update a Google Sheet deleting and then appending rows: unfortunately, the deleting loop do not delete single rows in time (IMHO), next loop where I need to append the updated rows, adds the rows generating duplicates. This is causing a problem because the next scheduled iteration will find two records with identical primary key so the delete function fails and causing the workflow to fail too. Do you have any suggestion?
Thank you

Hey @techaf! Would you mind sharing screenshots of your current setup?