If you what to hide a share on windows, you can append a $ sign at the end of the share name. This doesn’t work on DFS namespaces (DFSn do not advertise shares).
A trick can be to put Hidden attribute on DFSn folder you want to hide. Users can anyway see this folder if they select on file explorer to show “hidden files and folders”.
In this example a apply +h flag for hidden attribute and +s for system attribute (to see the folder you need also to untick “hide protected operating system files”)
attrib +h +s <folder path>