Gluing PVC junction box for custom size
If you can use metal boxes, there is an option that is exactly 2" deep.

They went and verbed the word gang, so you're search term is "Gangable Metal Box".  They are sold at most electrical supply places including many Home Depot stores.  They have various models with different types of wings for mounting.

At the bottom of the box in the picture, you can see a small screw.  Removing the screw allows you to take of the side wall and link it up to another box.  You could make a 12-gang box if you wanted to...

Gangable Box



Because it's a metal box, pay attention to grounding.  I believe the box must be grounded, so use grounding screws (there's a hole in the back for one) or ground your switch/outlet and use the type that have the self-grounding straps to ground the box.