Not sure if your question was answered but I think you can find the answer here : Swiftui append to a struct array doesn't work.
The problem you have is basically because you have everything in a view but should use something like ObservableObject: instead. The view is reloaded and cleared each time so that's why your entries are reset constantly.