Welcome to our forum and feel free to post your questions anytime.
Regarding not showing “leaf d”, do you also want to hide it from being configured?
If yes, there is an extension that allows you to hide any node and also be able to unhide nodes using a password you define in confd.conf (Or with no password). You can read more about this in the user guide: 20.23.8. Hiding parts of the configuration.
you can also use a NACM data rule that will hide the configuration node from the northbound interfaces you specify.
It can’t be hidden in a show output and still be configurable. It’s also not recommended if you plan on exposing this data to automation scripts.