This code provides a solution to presenting a UIViewController wrapped in UIViewControllerRepresentable from a SwiftUI view with the view controller being locked to portrait orientation.
Be warned: The code involves swizzling and usage of private API.
Video demo in this tweet: https://twitter.com/simonbs/status/1511425074720555014