It probably doesn’t matter in practice. They will have more lawyers and more money to burn on legal process than you. Who will go bankrupt first fighting a legal battle between you and, say, Apple?
Investors would check if you were subject to an IP assignment clause in your employment contract prior to investing. It's part of basic due diligence. They would then most likely pass on the investment.