using SP.UI.Modaldialog.showDialog (options); listview is running in spfx extension but no dialog is visible


Hello, I am trying to open the sharepoint dialog using the spfx extension where writing I can get the object SP.UI.ModalDialog in the ts file of the extension

And the code #

SP.UI.ModalDialog.showModalDialog (options);

It runs completely without any error.
But unfortunately there is no visible dialogue. Below is the onexecute method of the extension.

 public onExecute(event: IListViewCommandSetExecuteEventParameters): void {
switch (event.itemId) {
  case 'COMMAND_1':
    //Dialog.alert(`${this.properties.sampleTextOne}`);
    let ele = document.createElement('div');        
    alert("Asdas");
    let options = {
      title: "My Dialog Title",
      width: 400,
      height: 300,
      url: "https://*****.sharepoint.com/sites/***/home.aspx"
     };
    // SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
    SP.UI.ModalDialog.showModalDialog(options);
     break;
  case 'COMMAND_2':
    Dialog.alert(`${this.properties.sampleTextTwo}`);
    break;
  default:
    throw new Error('Unknown command');
}

}

Any ideas why the sharepoint dialog is not visible, I am trying on a modern site.
Any help is really appreciated.