How to add and remove from panel to dialog

I’ve replied to the other post you posted: Properties on the UXP panel but a great workaround would be not using the hide method at all!