modal panel closes automatically in next cases:
1) h:command*, s:link used. (Whole page updated after such requests)
2) a4j:command*, poll, support, and etc used and updates some component which contains opened panel. (Works as designed because panel reinitialized to closed state)
3) In previous 3.2.2 version there was issue with the popup components inside a4j:include (the only workaround is to define ajaxRendered=false)
So avoid this two cases and it will not be closed.