The Copyright Act 13(3) says
Where the author of a work was in the employment of some other person
under a contract of service or apprenticeship and the work was made
in the course of his employment by that person, the person by whom
the author was employed shall, in the absence of any agreement to the
contrary, be the first owner of the copyright
Case law would address the situation where there is no agreement defining what works of the employee are the property of the employer. In this case, there appears to be something in the employment contract, which would therefore be enforced unless specifically prohibited. There is no law prohibiting a contract clause that says roughly "anything you write while working for us is ours".
It is hard to say whether such a clause would he held to be unconsionable, since we don't know what the clause actually says. The basic test is if a condition is manifestly unfair, it cannot be enforced, but if it works to the advantage of one party, it can be. If the clause extends past the period of employment (forward or backward) it might be unfair. It might be unenforceable if "relates to" is construed over-broadly (for example, if you are hired as a lighting technician for a dance theater company and write sci-fi novels as a hobby, the claim could be that dance and sci-fi are "related" as forms of entertainment, but that would be an unreasonable claim).