That is just like his report that the Messenger of Allah ﷺ stood at the edge of the well, in which lay the slain polytheists of Badr, and spoke to them as he did. He did not say, "They hear what I say." What he said was, "They now know that what I used to tell them was the truth."Then she recited, "Indeed, you cannot make the dead hear" [Rum 30:52] and "nor can you make those in the graves hear" [Fatir 35:22].She meant that they came to know this once they had taken their places in the Fire.
قالت وذاك مثل قوله إن رسول الله ﷺ قام على القليب وفيه قتلى بدر من المشركين فقال لهم ما قال إنهم ليسمعون ما أقول إنما قال إنهم الآن ليعلمون أن ما كنت أقول لهم حق ثم قرأت {إنك لا تسمع الموتى} {وما أنت بمسمع من في القبور} يقول حين تبوءوا مقاعدهم من النار