Also the energy company scammers in Spain are still going strong. Even on local numbers.
If they're calling from within the EU then a cross-country judgement is still enforceable, so I assume they aren't doing that.
The first kind sends your call out from a local number in the country you're calling to. So someone in France has a French number, and you can use it following French local tariffs + a bit. The owner of this number would be prosecuted if he didn't cooperate with enforcing the law.
The second way is that you use IP to connect to your own country's PSTN. Normal international rates apply.
The third is that you use a platform like WhatsApp with no relation to the PSTN. In this case I don't know how the law applies.
The fourth kind (which you are not talking about) is that your PSTN carrier privately uses IP to connect to the French PSTN carrier but it looks like PSTN on both sides.
twilio can hardly be described as "providing service to one country", and has the same price list whether I'm using an American VPN or Dutch VPN:
No, you're just reading too much into "local". The price page for US also only has "local" only, but I know for a fact that "long distance" calls work fine.
There is many ways of doing spam/fraud, think also that some are not very clever nor have good financial literacy, they just don't know the best mechanisms due to lack of education in tech (and the dark side).
For example, some would pay an infected residential network for $5 per GB, and some will only pay $0.10 per GB, depending on how knowledgeable they are.
Most calls/bulk SMS can be done cheaply by just buying Stolen VoIP enterprise accounts (available on a ton of forums), a "scam" operation will resort to any way possible because they don't have any law affecting them as they do so already illegally, it's not the same as "marketing calls".