The auto-sorting breaks when you put a grand charm in your inventory. Instead of creating as much space possible, it puts everything into a row at the top of the inventory. This only seems to happen if you have a GC or another 3+ height item in your inventory. Once I have a GC such as Gheeds in there, it basically means I cannot use auto-sort or it’ll make my inventory pretty much useless or make me have to resort it myself anyways.
See screenshots here at imgur dot com /a/k0Za0qU