Add cancel button to dialog in dialog mode. Expected result: <img width="622" height="467" alt="Image" src="https://github.com/user-attachments/assets/475bcd1f-596c-48c0-883a-9c08a023921d" />