Some electrical boxes (like https://www.homedepot.com/p/Carlon-1...-40R/202077339 ) are attached to studs with a metal or plastic bracket that fits over the face of the stud. When drywall is removed from a stud in order to install the bracket, what's the best way to repair the drywall?

I suppose a sufficiently skilled person could smoothly "plaster" over the bracket with quick setting joint compound. Another thought would be to use a small patch of drywall which has had some of its back scraped off to compensate for the thickness of the bracket.