OK, the shop might not be happy about it, but you owe them the value of goods, and you've paid them in legal tender to the correct amount.
If you leave bank notes of sufficient value and run out, they are very unlikely to attempt to prosecute you, but they could, both for the theft and the nuisance of leaving your property lying around in their store. And the case would probably be resolved on appeal somewhere, with one judge arguing that the state has an inherent interest in having its primary currency universally accepted by all businesses in its jurisdiction, and another arguing that the state is overreaching when it tells shopkeepers what they must accept as payment.
See for example thean who took cash from his company safe, and replaced the same value a week later, but who was convicted of theft because the notes were different. See R v Velyumi here: https://www.lawteacher.net/cases/theft-cases.php
Taking cash from a safe is also quite different to taking goods that are explicitly for sale. Especially if you gave them the right amount of money.
Note that Velumyl was an appeal on the grounds that the defendant did not intend to permanently deprive, thus the money being different was relevant as he permanently deprived the owner of that specific property. Had the defendant contented there was no dishonestly -- that he intended to return equivalent funds and believed that the company would consent -- the decision may well have been different.
[1] Theft Act 1968 s.2(1) https://www.legislation.gov.uk/ukpga/1968/60/section/2
Heck, even my municipality doesn't take cash anymore (if you need to do things like renewing your passport).
Besides, this seems a bit of an "originalist" view of commercial transactions. I bet if I tried to pull that off, the police would take a dim view. But who knows, the Netherlands are a strange place.
Legal tender is "Legally valid currency that may be offered in payment of a debt and that a creditor must accept." ( https://www.wordnik.com/words/legal%20tender )
A retail store is perfectly permitted to have a "no cash accepted" policy. Even the public transit here generally has a "no cash" policy for fares.
For example, bus companies have had "cash strikes" after robberies, claiming cash is a danger against their working environment, and as a result nowadays most buses are cashless.
Retail shops and banks alike publicize and complain about the cost of handling cash transports securely.
We can guess these are probably complaints towards an end: yes, they want to save money. There is no vision or will to keep accepting cash.
I’d be the first proponent of a cashless society if we’d ban VISA and MasterCard from operating here.
German banks were also very accessible for foreigners.
Exactly how it works in The Netherlands as well.
Source: I worked in a coffeeshop, and got fed up with all the customers who wanted to pay by card which we did not accept (at that time) so consulted a lawyer on how to deal with this. It has to be communicated clearly, though I don't remember if it was at entrance or at the counter (IIRC the latter).
I don't know if this argument would hold up in court, as it can easily be gamed. But what are they going to have you do? Go and get the cash back and then pay it to the shopkeeper in court?
EDIT: On coming back to this, I agree with everything you said. I thought you had replied to my other comment in this thread where I proposed a way to pay with cash even where cash "isn't accepted", by just walking out of the shop "without paying", but leaving the correct amount of cash on the counter.