Hi Doug,
I was having a similar issue where sometimes my script would overwrite and sometimes it wouldn't. I contacted ESRI technical support and we figured out that the CreateWebLayerSDDraft tool is actually old and has been replaced with a newer tool - WebLayerSharingDraft. After I switched to that tool, my issues were resolved. I also use a list to loop through all of my content to ensure I have a correct match with the feature service name. That also seemed to help resolve my issues. Here's a snippet of my code:
# Create a new SDDraft and stage to SD for summary data
print("Creating SD file")
sharing_draft = mp.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", sd_fs_name)
sharing_draft.summary = "My Summary"
sharing_draft.tags = "My tags"
sharing_draft.description = "My description"
sharing_draft.credits = "My credits"
sharing_draft.use = "My disclaimer"
# Create Service Definition Draft file
sharing_draft.exportToSDDraft(sddraft)
# Stage Service
arcpy.StageService_server(sddraft, sd)
print("Connecting to {}".format(portal))
gis = GIS(portal, user, password)
#Check that it found the correct layer
list = gis.content.search(query=sd_fs_name,item_type="Service Definition")
i = 0
while list.title != sd_fs_name:
i += 1
print("")
print('MATCH FOUND!')
print(f'item.title = {list.title}, sd_fs_name = {sd_fs_name}')
item = list # define item based on above findings
item.update(data=sd) # use sd to update hosted "Service Definition" file
print("Overwriting existing feature service")
fs = item.publish(overwrite=True) # publish "Service Definition"
# Update Sharing
if shrOrg or shrEveryone or shrGroups:
print("Setting sharing options")
fs.share(org=shrOrg, everyone=shrEveryone, groups=shrGroups)