You have run into the sum-of-rows vs expression-total way of calculating sums/totals. It is for experienced Qlik developers well known that sum-of-rows most of the time will be equal to expression-total but not always. Qlik Sense and QlikView use expresion-total as default. That is why Qlik Sense does it correctly.
If you need to "fix" this in Qlik Sense you can use the Aggr-function.
Have a look at this article that is highly relevant to Qlik Sense although it is written with QlikView in mind: