Hierarchical Menu subcategory not working

I have the requirement of showing categories and subcategories and using HierarchicalMenu for implementation.
Below is my 2 levels of categories index name which is customized using connectHierarchicalMenu connector

 <HierarchicalMenuCustom
                attributes={[
                  'categories.level0',
                  'categories.level1'
                ]}
            />

Assume When I click on the clothing category, the URL will be like below and fetch data correctly
(http://localhost:3000/?search=jean&hierarchicalMenu[categories.level0]=Clothing&page=1)`

But in the case of selecting the SubCategory(Brands /// Momokrom), the URL will be like below and it fetches zero data results,
http://localhost:3000/?search=jean&hierarchicalMenu[categories.level0]=Brands%20%2F%2F%2F%20Momokrom&page=1

In both the cases in the URL, it is replacing the categories.level0 with the selected category or subcategory but the expectation is categories.level0 = categoryName and categories.level1= subcategory should append in the URL which is not happening now