Iāve seen this same behavior when I tried to a tag like ā#noprintā to hide parts of the doc I didnāt want to display when printing. If the tagged item had any children theyād show up anyway.
Thereās a great discussion over on another thread about being able to search for (or exclude) nodes whose ancestors have a certain tag. If that were implemented it could be applied to this use case too.