A square(panel) appears after deleting the last tab in AuiNotebook

Hello! I have a square (panel) in my program after deleting the last AuiNotebook tab. The panel is not deleted? Why?

I use the DeletePage() method to delete.

PS. I don’t create any panels outside of AuiNotebook.