I'm not 100% this is just an improvement, nothing is mentioned in the documentation of the sort order here https://extensions.xwiki.org/xwiki/bin/view/Extension/Document%20Tree%20Macro#HParameters . The way the parameters are described there sound like the order will be followed and not overwritten by the pinned pages order.