Communities where such situations often happen can choose to add it as a custom off-topic reason. Two examples from Stack Overflow:
Needs debugging details
The question should be updated to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem.
Not reproducible or was caused by a typo
While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Where that doesn't exist (because situations are not that frequent), one can always choose a custom off-topic reason:
(if you have enough reputation to vote to close; otherwise it's probably best to flag as 'blatantly off-topic' and leave a comment, which amounts to the same; while the 'blatantly' part is not technically applicable, nobody will see that stamp on the question, not even the author)
The list with (five) top-level close reasons, and on some sites the list with community-specific ones is quite long; users with smaller phones have to scroll to see them completely. (The Stack Overflow one even barely fits my iPhone 11...) IMHO there's not enough room to warrant another close reason which will be rarely used on most communities.