the preview panel will close as soon as you navigate to a different page / case. Otherwise you have to close it manually. The intend of the preview panel is that you should be able to perform any other action on the main page or on the preview panel. This is not like a modal that present any actions outside of the modal content or an overlay that will be auto-closed if you click outside of the overlay.
closing the preview panel is done using a simple runscript api
You can add this runscript in the submit button or the open assignment button if you want