So, your employer thinks that they own your side projects, although you work on that in your free time only.
But, is the employer right or not?
It depends on your contract with them. In most cases, if you have an issue with this it is best to seek advice from a lawyer.
There is not that much written in the law. The relationship and the status of the produced code are determined by the contract between the parties.
However, here are some general rules you can take into account: