Want a recommendation letter, but the professor passed away
Your best letters will come from professors who know more about you than that you did well in their courses. I hope you have some of those.
You could say in a cover letter that your exams in this persons courses were tops in each, based on anonymized department reports. I doubt that you'd be required to provide evidence for that.