Is it possible to show a custom dialog that stays open while there’s a modal operator running, like showing settings to a running tool?
The functions in bpy.types.WindowManager all create temporary dialogs: they close as soon as you press OK or move the mouse away from the dialog. But I don’t see one that creates a dialog that stays open (possibly forever).
Preferably a dialog using Blender’s UI, not some custom UI that you draw manually with a draw handler.
Here’s something more simple and nearest to what you are looking for.
It’s a modal tool that has a toolshelf to change between different tools on that operator.
If you are familiar with blf and bgl it’s easy to do, even just with blf depending of the application and needs. But pretty much you can get it working easily with the support of the API docs examples.