I didn't understand what you were saying at first, but it turns out that you have to click to remove the final, single letter before the "you won" screen shows.

And I agree it would be nice if the game could detect when you've reached a dead end and notify you somehow.