How to Calculate Cost of Goods Sold (CoGS)

A receipt reduces the balance for an inventory item based on the average cost when it is created. But it does not change the average cost. In other words, it causes a reduction of inventory at the average cost then existing. A production order adds to the balance for a finished inventory item based on the average cost of the input items plus any non-inventory cost. Accordingly, a production order can change the average cost of an item, depending on current average costs of other items. The processes are entirely different.

Your screen shot shows that on 25/5/2021, before you started making blocks, you had some in inventory at an average cost of 1,348.87. You then produced four batches at various costs, but averaging less than that. So your write-off and sale on 01/06/2021 both occurred at a somewhat lower average cost of 1,335.98. All perfectly ordinary and as expected.

If you do not understand the concepts behind average cost inventory valuation, you can read about it on any of dozens of accounting instruction websites.