Rockstar Games veteran Dan Houser participated in Lex Friedman's podcast and talked about his work on various studio games.
As it turned out, the life of the main character of Grand Theft Auto 4 was in great danger. Niko could have died, but he was lucky — at that time, the developers did not have an understanding of how to allow the player to freely explore the open world and the remaining content if the main character died.
As a result, it was decided to save Niko's life. However, the developers at Rockstar did not forget about the idea of killing the protagonist and decided to take this step in Red Dead Redemption with John Marston:
…I would have liked to kill Niko at the end of GTA 4, but it was impossible. You know, the game doesn't work that way. So that was one of the things we thought about but didn't do [and then during RDR1 development we were like:] "Let's do it. Let's take a chance and do it […] Let's try it". And it worked.