You are reading the graph wrong in regards to inventory because your graph doesnt reflect inventory costs. There's the problem. When COGS go down, gross profit margins go up which is why COGS is used to determine gross margins.
Lets say my buying of widgets is currently $10K a month to support $20k in sales. So I buy a $100k and lower my costs per widget by 20%. Thats a good thing unless my sales remain flat at $20k a month. Now I am maintaining an additional $90k in inventory with no increase in sales to offset this. My "COGS" dropped 20% but now I have all of this money tied up in inventory thus impacting my "Cashflow" negatively. Looks good on paper but I won't stay in business very long.