In case it helps someone, placing @Rincewind's code snippet in applicationDidBecomeActive restored the pre-iOS15 look of the navigation bar and ensured the navigation controller background view color updated when the user changed between light and dark mode while the app was running.
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = color // eg .black or .white
nc.navigationBar.standardAppearance = appearance;
nc.navigationBar.scrollEdgeAppearance = nc.navigationBar.standardAppearance