I encountered this situation years ago in some new houses we were wiring in extreme northwest New Jersey. They were 100% finished homes on slabs, no unfinished space whatsoever. No furnace, no boiler, just electric baseboard heat. My boss insisted upon just putting the transformer inside the panel and keeping the amount of exposed bell wire inside the panel to a minimum.
Obviously, this didn't fly with the inspector. He suggested what seemed to do well as a work-around. We attached the transformer to the bottom of the panel using the attached nipple and locknut, then we placed a two-gang mud ring to the stud below that permitted full access to the transformer. A two-gang blank plate finished it up.
Not exactly the best way to do it, but it satisfied the inspector for access.
"But the guy at Home Depot said it would work."