after portlet enter edit mode from view mode, the portlet mode. I can only be back to "view" mode if StateAwareResponse#setPortletMode is called explixitly or you sign-out (the current mode is saved in session) . That mean if you refresh page, or go to another page, then back --> it should be in "edit mode". If you want the portlet is in "view mode", I think you will need to make addtional request to server to change the portlet mode explixitly
so can you describe in details how do you want it should behave in your use case ?