In order for the hierarchicalMenu widget's rootPath parameter to work, you must have an active refinement on the value set in rootPath in order for it to be displayed in the hierarchy.
You can achieve this in a filtered category page by setting an initialUiState. For example:
initialUiState={{
instant_search: {
hierarchicalMenu: {
"hierarchicalCategories.lvl0": ["Computers & Tablets"]
}
}
}}
You can explore an example of the behavior in this CodeSandBox and learn more about initialUiState in our documentation.