This is true, but I imagine your scenario might be followed by threats from the CEO to X about noncompete clauses, confidential information, and theft of the company’s IP.
On the whole, these legal protections strongly advantage capital vs. labor, though California residents might benefit from their state’s hostility to non-compete clauses.