Looks like maybe labeled clearances on the drytype have been shot to hell, particularly if its a 150°C-rise unit. But then, who reads nameplates anymore? Oy.

Even if the transformer was strapped to the wall, well above/outside the NEC110 disconnect and panelboard space, the leftover working depth looks seriously constrained.