I have the same problem and tried to apply your solution but it doesn’t seem to work for me and I am wondering if I am missing something here.
My project (WIP) is: https://fair-fashion.webflow.io/
My collection list “Brands” has a nested collection list “Categories”.
This is the script I tried to use:
I would be forever grateful if you could help me.