I think if you introduce a problem, introduce tension because of the problem, and then the problem solves itself, that is almost never going to feel good.
I think that's the thing -- folks here suggesting that there is a reason the witness faked their death, or that the detective could put together that "hang on, something's fishy here," is a really good way to handle this because that is the detective finding the solution to the problem, uncovering that the problem is different from what we thought it was. It changes something.
But if the detective hits a dead end because of no witness, so that we can get the drama of "oh no!! what will the detective do now, with no leads?" and then the witness just turns up and solves that problem, then you could basically cut that entire chunk of story and it wouldn't change anything.
Detective: okay, my only real lead is this witness
Witness: - is dead -
Detective: Oh no.......... what will I do now....!
Witness: psych, I'm alive!
Detective: witness, thank goodness I found you. I have some questions --
could just be cut to
Detective: okay, my only real lead is this witness
Detective: witness, thank goodness I found you. I have some questions --
and it's not confusing, because nothing really happened in the interim. Generally, you don't like major pieces of your story to feel pointless. On the other hand:
Detective: okay, my only real lead is this witness
Witness: - is dead -
Detective: Oh no.......... what will I do now....!
Witness: psst, detective, I'm alive -- I had to fake my death, and since I'm in hiding, there's a limit to how much I can help you.
Detective: what! fake your death? Why?
can't be cut out so easily -- the witness's faked death reveals something new about the case and has consequences to the way the witness acts. Because it actually changes something in the story, it feels like a satisfying bit of plot.
I think that's the biggest thing... a coincidental solution feels bad when it makes readers feel like "well why did we just do all that, then?"