Not sure about that, there are plenty of island-states in Europe that would surely have more coast per km2. Cyprus, Malta, Faroe Islands and more comes to mind.
Would they? Denmark isn’t a single land mass. https://en.wikipedia.org/wiki/Denmark: “Denmark proper, which is the southernmost of the Scandinavian countries, consists of a peninsula, Jutland, and an archipelago of 443 named islands”
Also, the Faroe Islands are part of the kingdom of Denmark (but if you go that way, you’ll also have to include Greenland, which has a low coastline/land area fraction)
Although, I'd still guess that full islands probably have more coast per km2 than half-islands (as Jutland has a tiny bit that is not coast)
Worth adding is that we probably never will get a precise answer to this question, as measuring coasts is a famously hard problem where the more detailed the measuring, the longer the coast gets. https://en.wikipedia.org/wiki/Coastline_paradox
One option is to pick a yardstick size and keep that for all measurements. Disadvantage is that the size picked affects not only the coast lengths, but also relative differences and even rankings.
It also means scaling an area by a factor of N (typically) won’t scale its boundary length by N. That’s counterintuitive. That brings us to option 2: vary yardstick length with the size of the object being measured. Question then is: how exactly?
Other factors then amount of coast plays a role as well. An overcapacity of Danish wind energy can be converted into pumped hydroelectric storage in Norway.