Easiest solution is to just define a new class in CSS and add that class with DOM macros:
CSS:
#right-ui-bar.hidden { display: none; }
Then, in the PassageDone special passage:
::PassageDone
<<removeclass '#right-ui-bar' 'hidden'>>
<<if tags().includes('hide-right')>>
<<addclass '#right-ui-bar' 'hidden'>>
<</if>>
Then use the tag 'hide-right' to hide it.