Codex and Claude Code allows you to opt out of model training.
Perhaps you don't believe OpenAI and Anthropic when they say this, but it is a requirement upon which most enterprise contracts are predicated.