YMMV...
(I guess my point is: do you have more than anecdotal evidence to back this up? I don't, but you don't seem to either - I'm not aware of anything in NYS law that requires all that you do while employed at a company, even when not done on employer dime/equipment/time/space, to be owned by said employer)
Detailed discussions with a good lawyer about NY state law is that there are three classes of employee. Those are contractors, hourly, and professional. If you are not working by the project and don't have to track your time on a clock, then you are a professional employee. By default any work done by a professional employee which relates to that employee's job function belongs to the employer. (If a programmer writes a novel, the novel is probably his. But a program written is probably not his.) It is standard and customary for employers to add clauses to contracts reiterating that principle. This makes their case even stronger.
And yes, I've been personally caught on the wrong side of this. And yes, I personally know other people in an unrelated incident whose startup folded in exactly this manner.
OTOH if your contract has clauses protecting you then you are likely protected from this. However the common default is otherwise.
By contrast in California state law work done on your own time with your own equipment which does not use your employer's intellectual property is never a work for hire. This right cannot be signed away. The result is that your startup on the side is always legally protected.
And yes. This is among the reasons that I now live in California, and not NY.
Do the same thing in California and state law makes the startup I've been working on in my time with my money, mine.
To me this simple fact gives California a huge advantage in maintaining a startup culture.