This was spotted first on MathOverflow, but the method works fine here as well so I presume it's also possible on the other SE sites. Someone noticed that a closed question had been answered after it had been closed. The timeframe was a few minutes between closing and answering. There was a bit of speculation on meta.MO as to how this could have been done and to check what the mechanism was, I tried answering a closed question. I managed to do that, and in the process showed that there was no limit on the timeframe: the question I answered was closed last November.
I found this post on meta.stackoverflow which says that what originally happened is Status-By-Design, though the delay of an hour is perhaps a bit long (maybe the answerer took a lunch break?). This post seems to say that there is a block after a short time, but it doesn't go in to any details as to how the block is implemented. This question implies that there is no upper limit.
Given how easy it is, I would have thought that there should be a proper block on not answering closed questions rather than the current method which smacks of security-by-obscurity.
The MO question where I managed it is: Is it best to run or walk in the rain?.