A correct proof (a proof which is indistinguishable from previously sent proof) can be tagged as wrong by the ideal functionality here if the adversary sends no witness.
And, let's say P is a party which has does not have a witness, it can send an arbitrary string. And this proof might get accepted if the adversary has knowledge of the witness.
This functionality according to me does not capture completeness and soundness! Am I missing something?