The prophet knew about the zanadiqa that were around him, he didn’t kill, since they were pretending to be Muslims, if ridda was really about leaving the deen he would have killed the munafiqiin. But he didn’t he even prayed on the their leader when he died as Muslim, abdallah ibn abi salool, a visous man, anti Islam, munafiqq to the bone when he died, the prophet prayed on him, even Omar r was angry about that.Some Zanadiqa (atheists) were brought to `Ali and he burnt them. The news of this event, reached Ibn `Abbas who said, "If I had been in his place, I would not have burnt them, as Allah's Messenger (ﷺ) forbade it, saying, 'Do not punish anybody with Allah's punishment (fire).' I would have killed them according to the statement of Allah's Messenger (ﷺ), 'Whoever changed his Islamic religion, then kill him.'" bulhari 6922
Once he was leading 1/3 of Muslim army, and when the battle started he left saying “for what he we are killing ourselves for?”
Many times asked to cut almujiriin economally in the madina