Fix bug DNN-5360: move the mask to beforeClose event, hide workflow toolbar buttons when in host tab.