The inspector may be right. It sounds like there is a 40A feeder from main to subpanel. That subpanel has two solar inputs through 20A inverter circuits. Per 705.12(E), I think you can argue that the 20A circuits don't need to be held down nor does the 40A backfeed in the main panel. But that 40A feeder to the solar subpanel is just like any other subpanel main connection and in this case it is a backfed main. So if I understand things right, it needs a hold down.
What I don't understand is why that subpanel even has a main? Couldn't it be eliminated and just terminate the 40A feeder on the main lugs?