I have experienced some problem with UIPageViewController. At some point in its Coordinator the references to UIViewControllers become invalid. It causes to loose all of the UIPageViewController pages except first one after dismissing modal view.
As completion of basic SwiftUI tutorial Interfacing with UIKit the modal view presentation implemented on tap by featured item. There is github repo.
I have found after modalview dismissed the coordinator in pageViewController delegates looks for initially created UIViewControllers while they are recreated few times. So when I try to scroll over the pages the delegates can't find actual UIViewControllers
Have I missed something or is this bug in UIViewControllerRepresentable? How can I use modal view over UIPageViewController without loosing the ability to scroll over pages?