I believe the cases you refer to are when the anti-virus cannot delete the infected files. In that case, the virus will get restored. But in the case of an updated AV which has the virus signatures, it should delete the virus on restoration.