Window.open not working in ios

window.open works fine in Android but not in iOS.
I have “cordova-plugin-inappbrowser”: “^4.0.0”, installed and I am using Capacitor.
No errors when debugging on device.

Werid thing is it works fine on iOS is I use either of the following methods:
Template:

<a target="_blank" href="https://myurl/">
   <fa-icon [icon]="faGlobe" size="2x"></fa-icon>
</a>

or

this.alertCtrl.create({
      header: header,
      message: message,
      buttons: [
        {
          text: 'Cancel',
          role: 'cancel'
        },
        {
          text: routeLabel,
         handler: () => {
            window.open(url, '_blank');
          }
        },
    ]

    }).then(alertEl => {
      alertEl.present();
    });
if (this.isIos) {
      window.open(this.appSettings.appStoreLink, '_blank');
    } else {
      window.open(this.appSettings.playStoreLink, '_blank');
    }