That seems like the kind of “are you sure” notice that serves as an annoyance such that responding in the affirmative is automatized.
For posting to uncategorized and moving a post to an unviewable topic, an after the fact message with an “undo” would be preferable. For replying to closed topic, a warning before the message is written seems like the solution and butting into a PM.