I think you are right to be leery of this approach because readers (based on my own experience and preferences, at least) will be disdainful of it unless handled very well, which to me means the following:
Let it serve the story you are telling.
If the convention doesn't work with your plot, your characters, or your themes, or even the pacing or balance of the story, something has to give. If you like the effect of the narration enough, consider changing a different element to make them compatible. But remember that sometimes you have to kill your darlings, and losing the first person POV might be it.
Your options may include:
- Finding ways to keep that character's life, though past, important to the story and the resolution of the conflict. Perhaps they hid a crucial resource, or the other protagonist only prevails because of some aspect of the relationship they shared. There could even be (for a cliché trope) an eleventh-hour note delivered to the surviving protagonist, in the first person voice of the dead protagonist (or other device), which would reinforce that this character has been a protagonist throughout.
- Using the two perspectives to build strong dramatic irony when the protagonists know or believe different things very important to resolving the story's central conflict, but they lose the chance to resolve that disparity when one dies.
- Balancing the loss of the dead protagonist with a new first person protagonist, such as the PI investigating the murder, or the driver guilty of manslaughter who spends the rest of the story trying to atone. This will let you maintain an alternating POV format, if that's what you've established.
- Providing an in-story reason for supplying the dead protagonist's perspective; perhaps the protagonist is telling the story at that "life flashing before their eyes" moment, or one of your surviving characters is writing a biography or fictionalized/mythologized version of their life, or:
- Providing an in-story twist explaining the inclusion of the dead protagonist's perspective, such as the other protagonist is schizophrenic and dreamed up the other protagonist, and killing them off may be symbolic or a turning point in their mental health/other journey. This need not be fully resolved; it could be ambiguous, or only revealed as a possibility at the end.
- Revealing toward the end that these are two different timelines and the two protagonists are the same person.
Make it count.
This is your Psycho twist. It's a major break in convention, so only do it if it will rock the socks off your reader. Set up a meaningful death with the right mix of foreshadowing, shock and/or inevitability, and emotional gravitas for your story and your other protagonist, or the characters that care about your unlucky stiff. Avoid apparently convenient and cliché justifications for the death (and/or format). A death that in-world is arbitrary or random or wasteful may be okay, but it sure as heck better mean something to the reader.
Your story will be memorable because of the unusual format, so make sure it's remembered for being good rather than gimmicky.
All that said, there are plenty of books where the death of the protagonist, even the first-person narrator, does serve well. The most memorable one I've read recently was The Song of Achilles by Madeline Miller, which is narrated by Patroclus (whose death was arguably the most important death in the entire Trojan War). It's handled a bit differently in that he continues to narrate
as long as his shade haunts the earth.