Beyond this, putting a lock on the breaker box with energised lines could be deemed illegal without proper tag out procedures, depending on local regulations, as it may be necessary to access it in the event of an emergency.
although that saying is generally the case it doesn't really apply here because the trip mechanism is separate from the handle part of the breaker, they are specifically designed and tested for that exact purpose