When auto-sorting it places the full stacks first then the half-full ones, and when crafting afterwards it's always taken from the half-full ones for me. It's probably taking things from the last stack of an item you have, so if you place the half-full before the full ones, it will start with the full stacks.