I use galvanized screws to mount a panel to studs, but lag bolts for the mast.

The NEC uses some words such as "secured", with no definition. That leaves it open to the interpretation of the AHJ. Keep life simple...ask wkat you should use in that jurisdiction, and use it.

Dave