View disappears when rotating the screen

I made a ImagePicker in SwiftUI to pick a photo from the photo library. When the image was picked and shown by Image in a view, if I rotate the screen from portrait to landscape, the image disappeared. It behaves differently on different devices, e.g. on my colleague's device, the whole screen went black when rotating to landscape. And it is not always reproducible. But once it happens, it happends forever. I saw another post in this forum (https://forums.developer.apple.com/thread/119691) but I am not sure if they are the same issue. To check my code please refer to https://github.com/zjkuang/ImagePickerSwiftUI

Replies

Did you find a solution? I experience the same thing and I am not using a

NavigationView

.