The first dimension, Product, is correctly ordered by sum(Sales), that's the setting you've shown in the first image.
All lower dimensions will potentially not sort as expected if they are appearing more than one time,i.e. if Category has relations to more than one Product. QV will sum(Sales) only regarding Category, not the first dimension, and will this use as sort order for all segments. Brown is on top because it's total sum(Sales) is 40+40+10 = 90
I believe that's like the pivot table works, no individual sorting per segment.