I'm sure there's some kind of mechanism to prevent people from driving cars leased in another country, but how does it work?
How does police find those who drive a foreign vehicle illegally? Stop a vehicle in foreign plates, ask driver's license; if it is a local national driving, investigate. Police have very much powers in Nordic countries for these cases (they can always stop a car and investigate, there's no American type requirement for a probable cause.)
And of course, there are always people who report suspected tax evaders to the police.
There used to be a sort of a hunt for these cases between Sweden (who has no car sales tax) and Finland. E.g. there was a guy who lived in Haparanda on Swedish side and had a girlfriend in Tornio on the Finnish side, and stayed too many nights at the girlfriend's place. He got a big fine and had to pay back taxes because he should have registered himself as a local resident and imported and registered the car to Finland as well, including paying the car import tax.
I sold my first car to a Norwegian friend. It was a wreck so I sold it for the equivalent of 50 € (this was 1990). The friend then moved back to Oslo. She was asked to pay the equivalent of about 2000 € in car tax to register it in Norway. She gave it for scrap instead, of course.
If you are a permanent resident, you can't drive a vehicle with foreign number plates. That rules out leasing abroad.
Many people live in Malmö but work in Copenhagen precisely to avoid this restriction.
Leasing is usually a better deal in this case. You can get a small car for around 1500 kr / month.
I did the same for about 3 years in UK, and it was fine,even the local police and DVLA confirmed that I'm not braking any laws doing it, even though the law is structured in the same way - if you are a permanent resident you can't drive a foreign vehicle in the UK. Except if you work for a foreign company that gave you a company vehicle to use then yes,you can, and there doesn't seem to be any restriction on it.
For example: I know of a Dutch guy who leases a Ferrari through a Belgian company he set up for this, because it would cost him twice as much in the Netherlands. There are also examples of Belgian people driving cars with Luxembourg plates, etc. This is not illegal (though it's obviously a form of tax avoidance)
[1] See the question "Foreign company cars" here: https://www.skat.dk/SKAT.aspx?oId=2068721
Given we're talking a €100-120K tax difference on expensive cars, you can always consult a Danish tax lawyer and if he thinks it's doable do it anyway. If the tax authority has a problem with it then, then you just take it to court. Seems worth investigating.
But yes, some amount of this happens. The easiest case to get away with it is probably if you are actually from another EU country, and just keep it registered in your home country at a relative's address, and travel back occasionally to keep your license, insurance, and registration up to date. If you're Danish and have no foreign address, it would be more complicated to get it sorted out, especially with insurance, but I'm sure there are people who do it. Police attempt to crack down on it by looking for foreign-registered cars that seem to be parked too regularly in the same residential area (e.g. in front of a block of flats in Copenhagen). That's not illegal per se, since you might be a longer-term visitor, but they investigate these cases and catch some number each year.
Besides foreign-registered vehicles, the other most common evasion mechanism is probably agriculturally registered vehicles (which are exempt from tax). Hard to do if you have no connection to a farm at all, but in families where some of the family are genuinely farmers, the rest of the family who aren't will in some cases end up with all their vehicles registered at the farm.
[1] https://www.skat.dk/SKAT.aspx?oId=2068721