Gluing small pieces of drywall
Any common construction or project adhesive. That said, drywall nails are fairly thin for just that reason. If it's large enough that you're installing a patch, a nail won't destroy the patch. 

And that said, it's often the easiest solution to simply enlarge the patch to something suitable for repair, say 6" x 6". Float some one-by lumber or plywood scraps for backing and be happy.