Another really easy way to make this work is just to create an extension of the UINavigationController class.
Since overriding the preferredStatusBarStyle:
method wont work UNLESS we do it inside of the UINavigationController class.
extension UINavigationController {
open override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
}