We will almost never be able to prove whether a question copied verbatim is a homework assignment or not; it may be a contest problem, it may be a problem from a textbook (but not assigned to that particular user as homework), it may be someone else's homework (I have known enterprising students in the past who get friends to seek answers to problems online, and then "stumble" upon the solution).
This distinction, in my opinion, is irrelevant.
I posit that closing a verbatim question under the suspicion of being homework incurs no loss to the community if the supposition is wrong.
If a user can't be arsed enough to post at least a bare modicum of background knowledge, then I feel that the user doesn't deserve the solution. Furthermore, without some context as to the user's knowledge, we don't know if posting the solution will send the question "down the rabbit hole", with everyone involved eventually discovering that the user is a "run before you can walk" type that is asking questions well over his/her skill level. I'm disinterested in finding examples, but I'm sure most people have come across one or two.
(Bonus points for when the point back to someone trying to solve the Riemann hypothesis without knowledge of proper rules of how to manipulate limits).
Furthermore, posting full answers to such problems doesn't actually serve the community, in my opinion. It robs the other users of the pedagogical experience of experiencing why the question might be interesting, what context it might reside in, and what fallacious solution approaches might appear tempting.
A copied question with a full solution is like a crossword puzzle with the solution published on the same page. It's like reading a dictionary. Maybe it sates some folks' desire for knowledge, but absent any context, it fails to provide any intrinsic motivation.
That said, I've historically voted these questions as "not constructive", but only after giving the user some window to correct the post. A new user might not know how the community works, but in general many of these questions come from users who fail to sustain the community through the typical mechanisms: commentary, answers, and voting.
MSE should not be a factory, and while it is true that we cannot, in the rigorous sense, prove that any given user is using the community for homework solutions, can we please stop being so naive as to think that it's not commonplace?
StackOverflow, along with the dozens of other programming forums, etc. have been used as code factories for years and years. MSE is one of the very few mathematics forums that actively promotes (and provides tools for) problem solving. Why are we so naive to think that it's not suffering the same fate?