So, this may very well be intentional, but not sure.
If you have a hero leveled up much higher than the costume, wear the lower leveled costume, then various sorts still sort by the higher base hero power rather than the costume power.
I can understand why they may do this, but I think it would be better to sort by the selected costume power.
This is not a bug. It was introduced in Version 27, please check the release notes here. It was done so that you don’t have to scroll down looking for the hero everytime you changed to the costume version for leveling.