When people say "it was the war that got us out of the depression, not the new deal", aren't they conceding that government spending can work?

The countries where the Second World War helped the economy were mostly just the USA and Canada, I guess Australia and NZ, and I suppose some small countries that managed to stay neutral, maybe; I’m not sure how Sweden did. Those countries implemented fewer austerity measures than most of their allies. One of the reasons their economies boomed was enormous short term excess in demand created by their allies. Those nations were benefitting from a huge, desperate demand from the UK, USSR, etc. to send stuff in truly staggering quantities, but they weren’t on the front lines of the war to a great extent.

The economic effect of the war in countries that were buying all that stuff from the USA, Australia, NZ and Canada was not as positive. The United Kingdom came out of the war effectively broke.