So wait, is the point of the game that the character IS your dead friend (or the ghost of them)? And if not, then who/what is that character? Then is the game about figuring out the mystery of what it REALLY is?
And if they are just, boringly, the ghost of your dead friend, do they remember how they died? Is the game about them figuring that out? And what happens after they remember? Does the protagonist just stop playing the game, or do they continue playing the game and then the PROTAGONIST dies and becomes a game character too?
Does the best friend try to keep the protagonist in the game world with them forever like some kind of evil spirit? Or does the protagonist try to revive their best friend.
I am getting all kinds of ideas of what the plot COULD be from this prompt, but I wish you would give more of an idea of the plot yourself, be more specific, if that makes sense. Cause otherwise this is just a prompt that could go anywhere. What do you think the point of this story would be, is it supposed to be scary, or sad, or happy? Maybe even a comedy or romantic? I guess that's why you said you "don't know how to write it out".
"It's said that the game would replace a video game character that had died with a person who played the game." So when you first booted up the game, your friend replaced the "video game character that had died"? But if it's a VR game, then the players are not characters, they're themselves.
Then "But what happens when you meet a video game character that looks, talks and ACTS LIKE YOUR DEAD FRIEND?" But when your friend died, they were playing a game as a "player". If they're a "character", then does that mean the game now has a new character that wasn't there before? Or did they replace some other NPC? Kind of confusing.