כִּ֧י הַֽחַיִּ֛ים יוֹדְעִ֖ים שֶׁיָּמֻ֑תוּ וְהַמֵּתִ֞ים אֵינָ֧ם יוֹדְעִ֣ים מְא֗וּמָה וְאֵֽין־ע֤וֹד לָהֶם֙ שָׂכָ֔ר כִּ֥י נִשְׁכַּ֖ח זִכְרָֽם׃
For the living know that they shall die; but the dead know not any thing, neither have they any more a reward; for the memory of them is forgotten.
Shaarei Teshuvah
And it is likely that the case of the one praising the evildoers is from foolishness. For the fool (he) intends to praise the good - whether it is about the truth, or whether it is the opposite. And without knowing, he is praising the dead. For our Rabbis said (Berakhot 18b), [that] evildoers are considered like wraiths, as it is stated (Ecclesiastes 9:5). “But the dead know nothing.” But this unintentional sin is considered wanton. For a master would not love a slave, if [the slave] loves [the master’s] enemies and brings close those who he has distanced. Should they not know this from the intellect, that this is so? And it is stated (Proverbs 3:35), “disgrace uplifts dullards.”