If I install a 4 gang handy box and it sicks out past the drywall on one end, because the stud is crooked or some other reason, I usually do this...
Pull the end of the box out about inch with pliers, and run a bead of silicone caulking down the outside end of the box, near the edge.
Push the box back into the opening and hold it flush with the wall, and at the same time, run a drywall screw thru the end of the box so that it rests against the backside of the drywall....The screw holds the box in place until the silicone cures.
I then wipe the excess silicone off the exterior, while pressing all that I can back into the crack.
When terminating, I remove the screw.
Works well for me
Just a opinion
steve