If you want to programatically exit fullscreen mode then there is simple method to request fullscreen with uiPress.
Use the following javascript on the pages you desire to exit fullscreen mode on.
if (window.parent) {
window.parent.postMessage({ eventName: 'uip_exit_fullscreen' }, '*');
}