I was surprised when I saw a question rise to the top of Mi Yodeya's stack, that said "answered," while the question title said duplicate.
Is this a bug?
There is a grace period after a question is put on hold during which an answer that was started before the question was put on hold can still be submitted. The rather-old MSE post I linked to says this grace period is around 4 hours, but my own observation has been that it's somewhere around 30-60 minutes nowadays.
Also, apparently the mobile client (I don't know if that's mobile web, apps, or both) doesn't notice that the question was closed while you were answering, so that will always go through.