I believe the NEC requires that they be flush. You can take a reciprocating saw or hack saw blade and cut the nails or brackets holding the boxes. then move and reinstall with screws or put in new work boxes. Don't cut any wires.
© 2016 Renovate Your World LLC