ive ridden both and im going with trails.
you have to be careful in the dunes to avoid steep drop-offs or other riders for sure...
im gonna say though, that it takes more skill to go faster in the trails than in the dunes.. combine speed with trees, rocks, hills, creeks, rivers and mud and you have to be more skilled to go fast. youre also working the steering, clutch and throttle more in the trails.
in the dunes, to go fast you really only need to watch out for other riders and the occasional steep drop-off.