Custom dialog boxes, as a type of custom component, have their own lifecycle callbacks: aboutToAppear and aboutToDisappear.
onPageShow and onPageHide are lifecycle callbacks for pages – custom components decorated with @Entry, and do not apply to custom dialog boxes.
Reference