It's really up to you. Editing takes time. Your time is valuable. You need to decide whether it's worthwhile to use that valuable time to edit a post that you want closed.
I will note that one of two things will happen due to your editing: either the post will still need closing, or you will improve it to the point where it does not need closing. The latter is a wonderful outcome and is a worthy goal arguing in favor of editing in and of itself, but of course doesn't happen often. If on the other hand the former happens, it's highly unlikely your editing the post will fool people into thinking the post should remain open. Close-worthy problems are generally more structural than that. So you shouldn't worry too much about accidentally preventing a post from being closed when it should be.
One argument in favor of editing such posts (IMHO a very good one, and the reason I'm posting this answer) is that by editing the post, you have provided a clear example to the author of the post of what they should have done. Many people will ignore this guidance. Again, it's up to you to decide whether it's worth your time to try to help. But then that's the case for all of Stack Overflow. There are a lot of ungrateful, careless, lazy people visiting this site looking for other people to do their work for them. Yet, we still make an effort to try to help, knowing full well that even if the question is a good, well-presented one, our efforts may well go without any thanks or acknowledgement.
The point is that we're trying, and that some of the time we actually get the result we're hoping for.
One more time: it's really up to you. Only you can know how much patience and stamina you have for the often thankless job of trying to help other people on the Internet. But certainly it can be worthwhile to do so, and that includes editing a post that may be on its way to the trash bin. There is still something to be gained; if not the redemption of the post itself, then at least possibly the improvement of the author of the post.