A complement to the existing response,
try to look like an "offender." If it were you in the place of the person who wants to "steal / copy" the system and modify it for reuse or resale without authorization.
What work would you have to copy?
First, you need to adapt to the style of the code, understand the structure and accept the structure as it is, and most likely maintain the same pattern.
Only this work in understanding the structure is something very complicated. It is usually easier (less complicated) to choose to write a new system from scratch.
A system of your where you have control, when a bug comes you know where and how to solve efficiently.
Already in a third system when a bug appears you get lost without knowing for sure how to solve and then start gambiarras. The system is becoming a nightmare for maintenance. Ultimately the cheap is expensive.
A serious and competent programmer, such as a serious customer, would never choose this path.
Of course there are people of bad faith and dumb people who will copy / steal parts of codes or the whole system. Regarding this, do not worry. Of these guys, neither you nor anyone else will win anything because these guys are parasites. They will always want to cheat, steal something, because they are mediocre. Even if you get a contract and start a job, at some point you will be passed back.
Working with mediocre people is loss, loss of time.
Offer your products and services to serious people and period. As for rats, let them eat the remains and fall into traps.
Therefore, in short, make the open source code under a license in which you do not allow modified copies without authorization.
Note that "open source" does not mean "free". You can even generate serial numbers for each use license even if it is free to use. And you can also register at a notary and patent.
With due legal records, you can file lawsuits against anyone who violates the terms of use. If you evaluate that it is worth bringing a lawsuit.
There is usually no legal action against people with small businesses because the legal cost is greater than a probable indemnity. So basically expect the offender to make a good profit to start a lawsuit. Usually it's win-win. You will receive good compensation and may even completely break the offender's business. Not that it is pleasant, to see the misfortune of others, but for being fair and that is what matters, to be just.