We have no idea who started the fight, but it ended badly for the dragonfly.
The photos are in natural order by time...
When I first arrived, the action seemed to be over already.

But no, a few seconds later there was furious thrashing.

After several inches of thrashing along the ground, things calmed down again. (This one and the earlier two photos are all timestamped 6:06 pm.)

By five minutes later, the dragonfly was no longer moving, and the paper wasp was taking off with the first load of thorax meat.

This was after the wasp's first load.

Two hours later, the wasp had stopped visiting and the ants had moved in.

Web search finds lots of reports of wasp/dragonfly conflicts, most apparently ending badly for the wasp.
These two species commonly inhabit my yard, but I have no idea whether fights are common. This is the first one that I've seen.
The photos are from cell phone, except for the last one. That's from DSLR with macro lens and flash, and it's a merge of two photos that showed ants in more interesting positions.
--Rik