I've had to install a few of these in "old work" contexts (i.e. drywall is already up) in garages. I typically cut out enough drywall to snugly fit the box (4"x4") next to the stud, fit the new box in, and screw it into the stud.
However, I can never align the screws holding the box to the stud in a way that the box is flush with the drywall. If I try to use the existing screwholes (see picture below), the box ends up way too deep / not flush with the rest of the drywall and it looks weird (and makes it harder to properly put an extension ring on top of it). So I usually drill my own holes deeper in the box (and often buy the deeper 2-1/8" boxes) to attempt to make it flush with the drywall. This takes a lot of time, is not very precise, and requires me to drive the screws in at weird angles. Surely there's a better way to do this.
I can't use boxes with brackets since this is "old work" and I don't have the space to screw it into the stud. I also couldn't find any "old work" 4" metal boxes (at least not at big box stores).
So, how do people usually install 4" metal boxes in old work settings without a lot of pain and frustration?