see this post Special Mail Folders at Nextcloud - #4 by Shane_Treweek
your fix “should” be as simple as adding the directive for the equivalent of prefix = Shared.%%n@{{ $DomainName }}
in the way described in the link it allows the folder to be broadcasted as multiple labels to make it compatible as for example outlook has there own naming convention for spam (junk i think)