Sefer Chasidim Siman 399
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
אם הרויח אדם פשוט בעולה שהטעהו לבו ולא מרצונו אותו פשוט לא יערב עם מעותיו פן יספה הצדיק עם הרשע:
Medieval Jewish mysticism, translated by Sholom Alchanan Singer. Northbrook, Ill. Whitehall Co., 1971
If a simple person unintentionally made profit in a prohibited way because he got deluded by his heart (without intent) - he shouldn't mix it with his (other) money as is stated "Will you even destroy the righteous with the wicked?"