Making A Opaque shader see through

Im making a souls-like and I want the same effect as in a game like Dark Souls or Elden Ring.

When the player dies I want to make them fade away. I used a transparent shader with a script but the whole transparent shader gave it a weird look, you could see through everything regardless.

Could anyone help?