Tens of thousands of businesses can claim for lockdown losses, judges say