SwiftData updating a Model’s property which is a list

I have following problem, please refer to the code below.
In the app I can create an Artist (@Model) and add some Albums (@Model) to it. These are stored and displayed as supposed.

When I’m launching the app again and navigating to an Artist to delete for instance an album (using .onDelete(perform: removeAlbum) in AddAlbumView()) the new list is passed back to the previews view, but when I’m hitting save the updated list is not saved to the database.

So the workflow is as follows:
Select an artist -> Add/Show Albums -> delete an album -> go back -> hit save

The question is: How do I correctly update the list property of my Model (Artist)?

Any help is highly appreciated.

MWE.swift

import SwiftUI

@main
struct MWE_SwiftDataApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }.modelContainer(for: Artist.self)
    }
}

ContentView.swift:

import SwiftUI
import SwiftData

struct ContentView: View {
    var body: some View {
        TabView {
            ArtistView()
                .tabItem {
                    Label("All Items", systemImage: "list.bullet")
                }
            
            ItemView(artist: nil)
                .tabItem {
                    Label("Add", systemImage: "plus")
                }
        }
    }
}

struct ArtistView: View {
    
    @Query private var artists: [Artist]
    @Environment(.modelContext) private var modelContext
    
    var body: some View {
        NavigationStack {
            List {
                ForEach(artists) { artist in
                    NavigationLink(artist.name) {
                        ItemView(artist: artist)
                    }
                    
                }
            }
            .navigationTitle("Artists")
        }
        
    }
}

struct ItemView: View {
    
    @Environment(.modelContext) private var modelContext
    
    @State private var name: String = ""
    @State private var albums: [Album] = []
    
    let artist: Artist?
    
    var body: some View {
        NavigationStack {
            Form {
                Section("Name") {
                    TextField("Artist name", text: $name )
                    
                }
                
                Section("Albums"){
                    List {
                        ForEach(albums, id:.self) { album in
                            Text(album.name)
                        }
                    }
                }

                Section {
                    VStack(alignment: .leading) {
                        NavigationLink("Add/Show Albums", destination: AddAlbumView(artist: name, addedAlbums: $albums))
                        
                    }
                }
                
            
            }
            .onAppear {
                if let artist {
                    name = artist.name
                    
                    if albums.isEmpty {
                        albums = artist.album
                    } else {
                        albums = albums
                    }
                    
                    
                }
            }
            .navigationTitle("New Artist")
            .toolbar {
                ToolbarItem(placement: .navigationBarTrailing) {
                    Button {
                        
                        if let artist {
                            // New list of albums is not applied
                            artist.name = name
                            artist.album = albums
                
                            
                        } else {
                            let newArtist = Artist(name: name, album: albums)
                            modelContext.insert(newArtist)
                            
                            name = ""
                            albums = []
                        }
                     
                        
                        
                    } label: {
                        Text("Save")
                    }
                }
            }
        }
    }
    
}

struct AddAlbumView: View {
    
    var artist: String
    @State private var name: String = ""
    @State private var releaseDate: Date = .now
    
    @Binding var addedAlbums: [Album]
    
    var body: some View {
        NavigationStack {
            VStack(alignment: .leading) {
                
                Text(artist)
                    .font(.headline)
                
                TextField("Album name", text: $name )
                
                DatePicker(selection: $releaseDate, displayedComponents: [.date]) {
                    Label("Release Date", systemImage: "calendar")
                }
                
                Button(action: {
                    
                    let newAlbum = Album(name: name, releaseDate: releaseDate)
                    addedAlbums.append(newAlbum)
                    
                    name = ""
                    
                }, label: {
                    Text("Add")
                        .frame(width: 150, height: 40)
                        .foregroundColor(.white)
                        .background(name.isEmpty ? Color.gray.opacity(1) : Color.blue.opacity(1))
                        .cornerRadius(20)
                        .shadow(radius: 5, y: 8)
                })
                .disabled(name.isEmpty)
                
                Spacer(minLength: 40)
                
                List {
                    ForEach(addedAlbums, id: .self) { album in
                        HStack {
                            Text(album.name)
                            Spacer()
                            Text("Released: (album.releaseDate.formatted(date: .abbreviated, time: .omitted))")
                        }
                    }.onDelete(perform: removeAlbum)
                }
                .padding()
                .listStyle(.inset)
            }
            .padding()
            .navigationTitle("Add Album")
        }
    }
    
    func removeAlbum(index: IndexSet) {
        addedAlbums.remove(atOffsets: index)
    }
}

@Model
class Artist {
    @Attribute(.unique) var name: String
    @Relationship(deleteRule: .cascade) var album: [Album]
    
    init(name: String, album: [Album]) {
        self.name = name
        self.album = album
    }
}

@Model
class Album {
    var name: String
    var releaseDate: Date
    
    init(name: String, releaseDate: Date) {
        self.name = name
        self.releaseDate = releaseDate
    }
}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật