SANKEY: Force sorting order

Hello everyone!

I have the code that generates this dashboard, with a multi dropdown selector, that then generates the Sankey graph.
The code can be found here

As you can see by the image, everything is working fine except for the order that the first branch is presented, which is the years in the dataset (range from 2013 to 2022)

Apparently plotly is not respecting the sorting order which, in my view, should’t happen.

** Is there any way to force the branches to be generated by sorting order?**

Thank you in advance!

@AnnMarieW any ideas? Thank you!