generally there are rules about the fire rating of a wall between a garage and living space, and most places requirement a minimum R value of insulation in walls between conditioned spaces and unconditioned spaces.
Not an electrical code, but an energy code.
We require full depth insulation. Either 31/2 or 51/2 inches depending on the studs. And yes, the panels are bumped out.
It is my understanding that a panel cannot be installed in the garage wall that has living space on the other side without a fire rated treatment.
If the panel needs to be in the garage on such a wall we surface mount after the drywall.