It's not just a question of formalities, it's a question of general intent.
The Wikipedia article on "Piercing the corporate veil"[1] provides this example:
> A simple example would be where a businessman has left his job as a director and has signed a contract to not compete with the company he has just left for a period of time. If he sets up a company which competed with his former company, technically it would be the company and not the person competing. But it is likely a court would say that the new company was just a "sham" or a "cover"; and that as the new company is completely owned and controlled by one person that the former employee is deliberately choosing to compete, and so is in breach of that non-competing contract.
[1] https://en.wikipedia.org/wiki/Piercing_the_corporate_veil