Code requirement that wall box be tight to drywall?
You need an extender
Assuming that your 3/4&quot; &quot;behind&quot; the drywall means that the box is recessed into the drywall, you will need a box extender to fix the situation, as per NEC 314.20:

314.20 Flush-Mounted Installations. Installations within or
behind a surface of concrete, tile, gypsum, plaster, or other
noncombustible material, including boxes employing a flush-type cover or faceplate, shall be made so that the front edge of
the box, plaster ring, extension ring, or listed extender will not
be set back of the finished surface more than 6 mm (¼ in.).
Installations within a surface of wood or other combustible
surface material, boxes, plaster rings, extension rings, or listed
extenders shall extend to the finished surface or project therefrom.

Fortunately for you, plastic box extenders are cheap as chips at any home-improvement store and should serve you just fine in your application.