IOS Test doesn't work in iPhone landscape mode, I am using Appium+WebdriverIO + Mocha

Here is my test, it works fine in Portrait orientation on iPhone and both orientations on Landscape mode. All the buttons and names have the same names and it can find the ios buttons for Biometrics, but not the native apps. Here is the code followed by the appium logs.
const { setOrientation } = require(“wd/lib/commands”);

describe(‘Find and verify Nav bar exists and click Prepass logo button - Portrait’, () => {

before(async () => {
    driver.setOrientation('PORTRAIT');

    await $('~Don’t Allow').click();
    await $('~Cancel').click();
    await $('~B2C Authentication').click();
    await $('~SSOMockup').click();


});


it('Drive Tab, Select All Carriers', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "_TtGC7SwiftUI19UIHosting"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~Select All').click();
});

it('Drive Tab, Select All Vehicles', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "_TtGC7SwiftUI19UIHosting"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~decisions').click();
});

it('Decisions Tab', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "Decisions"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~carriers').click();
});

it('Carriers Tab', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "Carrier"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~settings').click();
});

it('Settings Tab', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "Settings"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~profile').click();
});

it('Profile Tab', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "Profile"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~drive').click();
});

});

describe(‘Find and verify Nav bar exists and click Prepass logo button - Landscape’, () => {

it('Drive Tab, Select All Carriers', async () => {

    await $('~Back').click();
    driver.setOrientation('LANDSCAPE');

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "_TtGC7SwiftUI19UIHosting"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~Connected').click();
});

it('Drive Tab, Select All Vehicles', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "_TtGC7SwiftUI19UIHosting"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~decisions').click();
});

it('Decisions Tab', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "Decisions"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~carriers').click();
});

it('Carriers Tab', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "Carrier"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~settings').click();
});

it('Settings Tab', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "Settings"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~profile').click();
});

it('Profile Tab', async () => {

    const iosStringHB = '**/XCUIElementTypeNavigationBar[`name == "Profile"`]'
    const hBar = await $(`-ios class chain:${iosStringHB}`)


    await expect(await hBar.isEnabled() && hBar.isDisplayed() ==true);

    const ppLogo = await $('~prepass.logo')

    await expect( await ppLogo.isEnabled() && ppLogo.isDisplayed() ==true);
    await $('~drive').click();
});

});
Tony’s Test - iPhone iOS 15.1.1 #0-0] :heavy_multiplication_x: Decisions Tab
[Tony’s Test - iPhone iOS 15.1.1 #0-0] :heavy_multiplication_x: Carriers Tab
[Tony’s Test - iPhone iOS 15.1.1 #0-0] :heavy_multiplication_x: Settings Tab
[Tony’s Test - iPhone iOS 15.1.1 #0-0] :heavy_multiplication_x: Profile Tab
[Tony’s Test - iPhone iOS 15.1.1 #0-0]
[Tony’s Test - iPhone iOS 15.1.1 #0-0] 8 passing (54.1s)
[Tony’s Test - iPhone iOS 15.1.1 #0-0] 4 failing
[Tony’s Test - iPhone iOS 15.1.1 #0-0]
[Tony’s Test - iPhone iOS 15.1.1 #0-0] 1) Find and verify Nav bar exists and click Prepass logo button - Landscape Decisions Tab
[Tony’s Test - iPhone iOS 15.1.1 #0-0] Can’t call isEnabled on element with selector “-ios class chain:/XCUIElementTypeNavigationBar[name == "Decisions"]" because element wasn’t found
[Tony’s Test - iPhone iOS 15.1.1 #0-0] Error: Can’t call isEnabled on element with selector "-ios class chain:
/XCUIElementTypeNavigationBar[name == "Decisions"]” because element wasn’t found
[Tony’s Test - iPhone iOS 15.1.1 #0-0] at async Context. (/Users/gaj.carson/Documents/PrePass.Mobile.Automation/Mobile_Automation_Appium/RegressionTests/test/specs/ios/ios-iPhone-HeaderBar.spec.js:145:22)
[Tony’s Test - iPhone iOS 15.1.1 #0-0]
[Tony’s Test - iPhone iOS 15.1.1 #0-0] 2) Find and verify Nav bar exists and click Prepass logo button - Landscape Carriers Tab
[Tony’s Test - iPhone iOS 15.1.1 #0-0] Can’t call isEnabled on element with selector “-ios class chain:/XCUIElementTypeNavigationBar[name == "Carrier"]" because element wasn’t found
[Tony’s Test - iPhone iOS 15.1.1 #0-0] Error: Can’t call isEnabled on element with selector "-ios class chain:
/XCUIElementTypeNavigationBar[name == "Carrier"]” because element wasn’t found
[Tony’s Test - iPhone iOS 15.1.1 #0-0] at async Context. (/Users/gaj.carson/Documents/PrePass.Mobile.Automation/Mobile_Automation_Appium/RegressionTests/test/specs/ios/ios-iPhone-HeaderBar.spec.js:159:22)
[Tony’s Test - iPhone iOS 15.1.1 #0-0]
[Tony’s Test - iPhone iOS 15.1.1 #0-0] 3) Find and verify Nav bar exists and click Prepass logo button - Landscape Settings Tab
[Tony’s Test - iPhone iOS 15.1.1 #0-0] Can’t call isEnabled on element with selector “-ios class chain:/XCUIElementTypeNavigationBar[name == "Settings"]" because element wasn’t found
[Tony’s Test - iPhone iOS 15.1.1 #0-0] Error: Can’t call isEnabled on element with selector "-ios class chain:
/XCUIElementTypeNavigationBar[name == "Settings"]” because element wasn’t found
[Tony’s Test - iPhone iOS 15.1.1 #0-0] at async Context. (/Users/gaj.carson/Documents/PrePass.Mobile.Automation/Mobile_Automation_Appium/RegressionTests/test/specs/ios/ios-iPhone-HeaderBar.spec.js:173:22)
[Tony’s Test - iPhone iOS 15.1.1 #0-0]
[Tony’s Test - iPhone iOS 15.1.1 #0-0] 4) Find and verify Nav bar exists and click Prepass logo button - Landscape Profile Tab
[Tony’s Test - iPhone iOS 15.1.1 #0-0] Can’t call isEnabled on element with selector “-ios class chain:/XCUIElementTypeNavigationBar[name == "Profile"]" because element wasn’t found
[Tony’s Test - iPhone iOS 15.1.1 #0-0] Error: Can’t call isEnabled on element with selector "-ios class chain:
/XCUIElementTypeNavigationBar[name == "Profile"]” because element wasn’t found
[Tony’s Test - iPhone iOS 15.1.1 #0-0] at async Context.
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:01:01

2022-06-10T17:25:55.906Z INFO @wdio/local-runner: Shutting down spawned worker
2022-06-10T17:25:56.159Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2022-06-10T17:25:56.159Z INFO @wdio/local-runner: shutting down