Editor -> Display a modal dialog with a progress bar

I have some time intensive process done inside the editor, and I would like to lock the interface and show a modal dialog that display a progress bar.

All example I seen say to use EditorUtility.ProgressBar, however that was before 2020 because in 2020 was introduce the “idle dialog” that move the ProgressBar away.

Also seem the Progress class, but can seem to make it to work…

Anyone know how to display a simple modal dialog with update status?

Using 2021.1.1f1

Unity still use some for of the old Progress Bar
6999035--827018--upload_2021-4-1_18-55-39.png

How can we replicate it?

I saw people from unity suggesting to use the Progress class, but can we have a working example of that class for an editor command?