Freestyle line sorting not working?
I used two sets of lines in the example above, and for sorting work only one is needed. If there are more than one set, then the first is superimposed on the second, and so on.

So I changed colors with a modifier (I previously created two groups of objects and each created its own set of lines) and the sorting, finally, started to work as expected :)