This won't happen. There is no reason it should. If a post really deserves to be hidden and voted down, then it's only fair that it's treated accordingly.
People should be penalised for making a post of such a low quality that people are inclined to vote it down. Why should hiding the post change this? In what way do people deserve to have the votes removed if their post is hidden, any more than they do when it's shown? If anything, having the post removed is further reasoning as to why they should keep the down votes. This system could also be exploited; if a post is voted down, its author could take it down and the votes would be gone.
(Side note, if hidden posts end up deleted entirely, the votes will go down with it. This happens often enough to hidden questions at least; in the past I've followed several links that turn an error message instead of a hidden post.)