After rereading your script I do see that you’re setting the value of fm["tags"]
, not changing the list which would be needed to preserve other tags.
With that in mind I think it’s safer to use a dedicated status property to avoud interference with other tags. Then you can change it to your hearts desire and not worry about side effects related to other potential tags.
If you want to keep using the tags property you’ll also need to do the remove and insert operations in order to preserve other tags.