Client Claiming Ownership of Code I Wrote as Freelancer

I publish illustrative scenarios prepared by my practice. All participants and conversations are fictional. The fictional posts are not posts by real users, accounts of client experiences, or reports of actual results.
Illustrative scenario prepared by my practice.
For informational purposes only. This is not legal advice.
Hypothetical question

Looking for advice on this situation. Client Claiming Ownership of Code I Wrote as Freelancer What would you do?

Details: I'm in a situation where I need to understand my legal options. Has anyone dealt with something similar?