I would counter that this software was created and maintained on your own time, in which case that at the very least you are entitled for consideration for your work and efforts.
Employment tribunals and courts take a dim view of wage theft, and that is exactly what this is if your employer is trying to enforce that clause.
Get advice from an employment lawyer.