Generally if a question is edited in a way that significantly changes what it's asking and invalidates an existing answer, assuming the original version of the question was itself a decent enough question, the edit should be rolled back.
Of course it's a bit of a judgment call whether a given edit significantly changes what the question is asking, but I think this case does meet that bar. So I would suggest undoing the asker's edit in this case. And there's no need for a moderator to do this; anyone with enough reputation can do so. Even the person whose answer was invalidated by the edit to the question can do it, although it might be a good idea to try to get a second opinion because there is the potential for a slight conflict of interest there.
If there are many new answers that would themselves be invalidated by rolling back the edit, then that might be a reason to make an exception; in that case we'd have to balance the harm done by invalidating the new answers against the good done by revalidating the old answers and maintaining the principle that questions shouldn't be drastically edited. When there's doubt about this, it's probably a good idea to make a meta post, but if the balance is close I'd roll back the edit and write the meta post to ask whether to re-apply it.
I think there should be a comment left to the people who answered that the question was edited. We get a comment if our answer is edited, no?
No, you do not get a comment left automatically when your answer is edited. The editor may leave you a comment if they think it's necessary, but they have no obligation to do so. However, you do get a notification if your answer is edited. It might be reasonable to also get notifications when a question you've answered has been edited, but that could add up to a lot of notifications for some people so there are arguments for an against. This has been brought up on Meta SE.