This is a semantic problem: the pin action is a child of the tree, when it should be a child of the treeitem. But right now the treeitem is an anchor. It's an interactive element already, so we can't add an interactive child in it.
See https://ci.xwiki.org/job/XWiki%20Environment%20Tests/job/xwiki-platform/job/stable-17.10.x/73/testReport/junit/org.xwiki.search.test.ui/AllIT$NestedSolrSearchIT/MySQL_9_2__Tomcat_11_jdk25__Filesystem__Chrome___Docker_tests_for_xwiki_platform_search___Build_for_MySQL_9_2__Tomcat_11_jdk25__Filesystem__Chrome___Docker_tests_for_xwiki_platform_search___verifySpaceFaucetEscaping_TestUtils__TestConfiguration_/ for an example of where it was hit.