Contracts don't determine what is legal and not legal. If the said person is found out then they would be in breach of contract and could be fired or sued. They would not earn themselves a criminal record.
They could earn themselves a criminal charge if the court decides what they're doing is fraud which it likely is if they have signed something saying they wouldn't work elsewhere simultaneously.
that's not enough to show injury. If an employee does all their assigned work, there is nothing of value lost by the employer. No injury means no standing means no fraud.