There are multiple questions on meta about users deleting their question right after receiving an answer, before this answer can be upvoted.
I don't see any reason to leave this 'window of opportunity'. No one benefits from it, except for dishonest people.
If an answer left is not relevant to the question and the OP has noticed that the question is bad and wants to delete it, then they can just flag the answer for moderator's attention and wait until it's deleted. Or even edit the question since no relevant answers were given yet.
If the answer is on point, then it's not the answerer's fault that the OP changed their mind.
Do you agree that the deletion of answered questions by the asker should not be allowed?