delete_tag removes a tag from the graph-level tag list but leaves it on every note that already uses it. The tag still exists in the graph; it's just orphaned from the UI. The name implies full deletion.
Either rename it to something like remove_tag_from_index to be honest about the scope, or add a parameter to cascade the removal to all notes. As it stands, calling it leaves things in a state that's worse than before – notes carrying a tag that no longer shows up in any tag filter.