A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Your screenshot truncated one important piece of information; the worksheet name. I think that the worksheet you are on is named Calculated Data - XXX and this is used within your SUMIFS() formula. A Sort does not carry any cell reference that is prefixed by a worksheet name so you should remove the local worksheet name from the last section of the formula.
'Calculated Data - XXX'!$B13
... should be,
$B13
The earlier reference to 'Calculated Data - XXX'!$E$4 should be left alone as it is outside the block of sorted values and should not change with the sort.