If you are talking about having the copyrighted source code not be used to train an AI, you could look at the discussions surrounding a recent license change in the Reticulum project [1].
I had previously been curious about this, and made a post on HN that got limited attention [2], but if you are wanting your software to not be used to create training data for third-party models, it could be a little relevant.
[1]: https://github.com/markqvist/Reticulum?tab=License-1-ov-file...