Is your Revit file on Revit Server? We had this same issue and I tested everything including shutting down the computer and restarting after a weekend and it still removed the previous dynamo scripted work. What I found was I needed to wipe out the model history by detaching and replacing the model on Revit Server.
It still removes the previously-created objects. I do NOT use Revit Server, my revit file is simply a single file for only one user. So weird! my dynamo program is almost done and only getting stuck here, I am quite disappointed.
I also have been seeing this behavior. Similar behavior seems to happen when copying and pasting components, (that have been used to in a previous run). In my case, it is specifically, with the FamilyInstance.ByPoint component. The only way around is to restart dynamo, as previously suggested. Is this a known behavior or is there an alternative?
Have you tried this?