May Allah forgive Abu Abdul-Rahman. He did not lie, but he forgot or made a mistake. The Messenger of Allah ﷺ simply passed by a Jewish woman who was being mourned, and he said, "They are weeping over her while she is being punished in her grave."
حدثنا قتيبة عن مالك قال و حدثنا إسحق بن موسى حدثنا معن حدثنا مالك عن عبد الله بن أبي بكر بن محمد بن عمرو بن حزم عن أبيه عن عمرة أنها أخبرته أنها سمعت عائشة وذكر لها أن ابن عمر يقول إن الميت ليعذب ببكاء الحي عليه
غفر الله لأبي عبد الرحمن أما إنه لم يكذب ولكنه نسي أو أخطأ إنما مر رسول الله ﷺ على يهودية يبكى عليها فقال إنهم ليبكون عليها وإنها لتعذب في قبرها
Agreed upon by Bukhari and Muslim. Muslim narrated it in the Book of Funerals, chapter "The dead person is punished for the weeping of his family over him," hadith no. 932/27, from Qutayba. Bukhari narrated it, hadith no. 1289, from the hadith of Malik with the same wording, and it is also found in Muwatta, 1/234 (Yahya's version), with slight variation.