I think the courts will sometimes look at the substance rather than just the technicalities.
For example, they may lift the 'corporate veil' to see who is behind a company, where there is a 'fraud or sham' and someone is trying to do something they would be prevented from doing. There's a whole body of caselaw some of which may be relevant to these circumstances. I'm not saying it is the whole picture as usually the legals depend on the detail but in lay person's terms -
Gilford Motor Co Ltd v Horne (1933)
H was a car salesman, and left G. His contract stated that he wasn’t
allowed to sell to G’s customers for a period after leaving. H set up a
company which then approached his former customers; H argued that
firstly his company was approaching the customers, not him; and
secondly, if thee was wrongdoing, his company was liable and not him.
The courts held that the company was sham, and granted an injunction
against his company as well as him.