There are serious consequences if false self-employment is discovered in an audit. Social security contributions for the contractor have to be paid in arrears. This can result in a considerable sum for the client, especially since late payment penalties are added.
The unpaid wage tax has to be paid too and the sales tax charged is no longer valid and there is a complicated reversal process.
In terms of labor law, it's possible that the previous contractor becomes an employee. They can even assert this status in court. If they are successful, they are entitled to continued payment of wages in the event of illness as well as paid vacation, and they benefit from dismissal protection.
If the company has acted with deliberate intention, the consequences are even more serious. A fine or even a prison sentence are possible then.