Why do flipped cockroaches sometimes lose their heads?
In all likelihood, it is your cat who crunches the cockroach's head once it catches it and/or finishes playing with it. 

Ants do eat bugs but they are usually not so selective that they'll carry off the head alone. With more manageable insects, they carry the whole thing off; otherwise they take it apart and carry it away in pieces if they're interested in it as a food source.

If you watch a cat with a mouse, chipmunk, bird, large insect, etc, they often seek to kill the animal with a throat or nape bite if they are done 'playing' with it. I've found headless prayer mantises and other large insects in my garage many times, and have seen my cats beheading them.

The techniques that cats use to kill prey vary with prey size