I has the same issue and here is my code:
if (@available(iOS 15.0, *)) {
UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init];
[appearance configureWithOpaqueBackground];
//appearance.backgroundColor = [UIColor blueColor];
appearance.shadowColor = [UIColor whiteColor];
appearance.titleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor colorWithRed:24.0/255.0 green:44.0/255.0 blue:122.0/255.0 alpha:1.0f], NSForegroundColorAttributeName,[UIFont fontWithName:@"AvenirNext-Demibold" size:21], NSFontAttributeName,nil];
appearance.backgroundImage = [UIImage imageNamed:@"Bg_portrait_540x120_1.png"];
self.navigationController.navigationBar.standardAppearance = appearance;
self.navigationController.navigationBar.scrollEdgeAppearance = self.navigationController.navigationBar.standardAppearance;
}