There is a command show_external_ui which shows the LV2 plugin's external UI. There should be the complementary function to hide the UI. There should also be a check as to whether the external UI is already showing before launching it, otherwise you can get orphaned displays.