How to make secondary action in frappe.confirm act differently from close (X) button?

Hi all,

I’m using frappe.confirm to show a confirm dialog, but I notice its behavior that the secondary action is also performed when clicking close button (X), or clicking outside the dialog (to close it).
Is there any way to make the secondary action perform only when clicking the seconary button? I just want when clicking close button or clicking outside to just do nothing

I’m using this simple code pattern for testing (this example the console logs ‘no’ when closing the dialog with X or clicking outside dialog):

frappe.confirm(__("Do you want to perform this operation ?"),
						() => {
							console.log('yes')
						}, () => {
							// action to perform if No is selected
							console.log('no')
						})

try this code

refresh(frm) {
		// your code here
        frm.disable_save();
		frm.add_custom_button('Save', () => {
            frappe.confirm('Are you sure you want to Save?',
            () => {
                // action to perform if Yes is selected
                console.log("yes")
                frm.save()
            }, () => {
                // action to perform if No is selected
                console.log("Ne")
                frm.save('Cancel');
            })
        });
	}