The NEC is an installation standard, not a safety standard. However, as pointed out the NEC does have many requirements for installing a means to allow a lock out device to be used. Perhaps the best reference is
110.25 Lockable Disconnecting Means. If a disconnecting
means is required to be lockable open elsewhere in this Code, it
shall be capable of being locked in the open position. The
provisions for locking shall remain in place with or without the
lock installed.
Locking the panel cover does not comply.
But if you are installing a CB lockout, one of those cheesy plastic things for perhaps a lighting circuit, then 110.25 does not apply.
And a panel cover has screws that can be removed locked or not.