Adjust wait/retry condition
What does this MR do?
Fix transient failure #295675 (closed). I could not reproduce this failure locally but I think we checked for deletion too quickly. I'm having the test to retry a few times if necessary to query for the deleted pipeline after deletion.