I am now waiting for the post to be fixed
Wait, what? You just said…
I see what @meagar means, but after fiddling with it, I could see multiple problems with the supplied code, which I addressed.
That says to me that you actually took the time to do the work the asker was supposed to have done in advance. Now, I don't know why you wasted the time to do that, but since you did, you are in a perfect position to edit the question and fix its problems. In other words, you can turn it into a real question. You don't have to "wait" for the post to get fixed.
And, of course, once it's fixed, the process of getting it re-opened proceeds much more quickly.
So, I think it is fine to disabling answering on a question that is [on hold], but I think that it is unfair to disable the Post Your Answer button once a user has spent time trying to answer the question.
I disagree that we need a special case here. How should the system know how much time you've spent trying to answer the question? Lots of people compose answers in the IDE of their choice, rather than in the textbox on the page. How should that time be taken into account?
More to the point, by closing unclear questions, we are trying to save other people the time that you have invested in this one. You have already admitted that the question was unclear to you at first, and how you can see what the people who voted to close it were thinking.
If you really saw a gem in the question that early, you should have edited it first, before spending time on an answer. If you didn't see any redeeming value in the question before spending a lot of time answering it, then I guess I would just ask that, in the future, you spend your time more wisely, investing more heavily in answering high-quality questions, rather than low-quality ones.
Of course, you are welcome to answer any questions you want. But, as has been pointed out already, you took a gamble in trying to answer a low-quality question.