That contract is not enforceable in any state that I know of. It is contrary to public policy and is not equitable.
Thus it is not enforceable.
Now, if the idea or patent is derived from something you invented or worked on while you were employed, there, they would have an argument.
Also, if you are required to sign such an agreement after already being employed for a period of time, and you are not provided with significant compensation, then the contract is without consideration and is not enforceable. If the only consideration is keeping your job, that is under duresss, and can't be enforced.
Courts will not enforce contracts that are inequitable or that have no consideration, or contracts that are contrary to public policy.
Claiming copyright to anything you write or create is really out in left field. I have NEVER read a single case in any state that upheld such a contract at the appeals level.
Software is not a patent issue. You can write any software you want and copyright it.
If you are paranoid, form a corporation and copyright it in the name of the corporation. No company, no matter how big they are, is going to use or have the resources to research backwards every piece of software or whatever registered by some corporation somewhere. So what if they do, they have no claim. Most absurd thing I ever heard in employment law.
Most employment contracts with non-compete clauses are illegal, much less any claiming patent or copyright claims to work produced by a former employee for a year or more afterwards.
ANY employment attorney or anyone at all. Show me one flipping case on the appeals level in ANY STATE where anything so absurd was upheld and was never overturned.
I would never sign such an agreement. Do not quit or give them any other cause. If they fire you over that, you have a good shot at significant damages. You would want to get the opinion of employment lawyers in your state before making any irreversible decisions.