Grasshopper DocumentChanged: question

Hello, i use DocumentChanged event to hide panel when a new document created or opened
but nothing happened, the panel always appears in all documents.

side panel test.gh (3.9 KB)