Does Kruskal-Wallis test have a non-parametric analogue that isn't sensitive to groups having different variability? I need a non-parametric test for my project (because I can't be sure that the distribution would always be normal), so I decided to use Kruskal-Wallis test.
But the problem is that Kruskal-Wallis test doesn't return the correct result if the groups doesn't have the same variability.
Does Kruskal-Wallis test has a non-parametric analogue that isn't sensitive to groups having different variability?

As well stated by @Glen_b the K-W test works as advertised in the unequal dispersion setting.  In general it is difficult in such settings to know what estimand to seek or what conclusions to draw.
The K-W test is a special case of the proportional odds ordinal logistic model - one that contains only mutually exclusive indicator variables for the groups.  Unequal dispersion is related to the proportional odds assumption, and you can generalize the model to allow continuous or discontinuous transition in group effects that are analogous to scale changes, using the partial proportional odds model as implemented in the R VGAM and rmsb packages.
