I stumbled upon this thread where the following is suggested to prevent a window from being hidden:
[window setCanHide:NO];
This just covers hiding. If your window gets closed, you might try to use the window delegate? There's a call that let's you prevent the window from being closed
- (BOOL)windowShouldClose:(id)sender