Script deleting previously created elements

Hi,
Have you reviewed the discussion around “reconciliation” ?
This could be what you are experiencing.