I also ran into this issue, but am unable to build my project with the Swift 6.0.1 toolchain, as Xcode reports an SDK/toolchain mismatch when trying to import SwiftUI.
See my corresponding post here: Unable to Use SwiftUI With Latest Swift 6.0.1. Compiler Due to Toolchain / SDK Mismatch