Can you still get cash-back when paying by debit card?

You should be able to?
Now that said Lidl didn't accept credit cards, only debit cards, long after everyone else did, until a couple of years ago, so they might have a more bespoke arrangement with their bankers that don't cover this at a price thats workable for them.