View is not updating by adding or deleting an item

When I parse the query result(SwiftData) to my DetailView it works fine. But when I delete the item in the DetailView the view isn't updated. I parse the array from the dataModel to the DetailView. But I do not understand why it's not updating when I add or delete a tree in the DetailView. Only when I append the tree to the array from the other model after insert it works.

Does someone have a tip for me?

Here is my Code: https://gist.github.com/romanindermuehle/14441c21f689e91b26942d997f75300d

View is not updating by adding or deleting an item
 
 
Q