It is not entirely clear how you want, when leaving the channel window remained open, if server command "/PART #channel" performs leaving, and mIRC automatically closes the channel window.
Maybe you mean when the command "/KICK #channel nick" was executed on your nickname?
Try to examine in your account ZNC the settings and parameters of the modules that are connected to your ZNC. Perhaps it is they who influence this no standard behavior.
If your question is not related to the work of the ZNC, then I can assume that you would like to receive a special switch for the command "/LEAVE -switch #channel", so that your nick was leaving the channel, but the channel window staying open (did not closes) for reading logs. Another variant is if in settings the options or menu for this will appear a special item.
It is possible there may also be some other options for solving this problem.