Hide detail pages from navigation

Currently, one can hide detail pages in workspace selection, however, I can’t (automatically) hide it from the navigation bar, is there a workaround for this other than manually inputting the values?