Muhammad from Sa’ad ibn Isma'il from his father from al-Ridha عليه السلام, peace be upon him:
Imam al-Ridha عليه السلام was asked regarding a man who commits sin, should we pray behind him or not? Imam عليه السلام said: “Do not pray (behind him).”
Ali Akbar al-Ghaffari
Tahdhīb al-Aḥkām fī Sharḥ al-Muqniʿah, vol. 3, p. 305