What drill bit do I need to screw a hex cap screw into a wall stud? The magnetic DeWalt nut driver bits aren't an exact match
The DeWalt nut drivers (and others also) are very shallow (only meant for driving sheet metal screws (and are magnetic).

As suggested, regular sockets with a rachet handle will cover the hex head and not be pushed-off by the cap head.

You can get a socket adapter for your impact driver and then use your regular sockets: