As a preface, let me apologize to knowledgeable people if things I say make them wince, I have no genetics or virology background whatsoever and my science-speak is taken straight from Wikipedia.
The lore of my setting has a virus (man-made, neurological effects, near-100% fatality rate) wipe out most of humanity, and stay permanently present in the environment by becoming endemic to some animal species. However, I need this virus to have become virtually nonexistent for humans by the time my story starts, with the main goal of having let the world population bounce back a bit (not much, we're talking about Ancient Age levels, tops.)
For this purpose, I'm exploring the possibility of the virus' weakness being a rare gene, that would make it unable to survive in its host and quickly disappear before it's done any real damage. This gene would follow an autosomal dominant inheritance pattern, so that it eventually "takes over" completely as non-carriers die out while every carrier is guaranteed to pass it down to the next generation, effectively erradicating the virus among humans after some time and becoming the main reason they didn't actually go extinct.
Problem is that viruses mutate, quite fast, and I have no idea how much of a "fundamental" effect genes have over the ability of viruses to survive in a host — whether it could credibly be too much of an obstacle for mine to overcome, or if it'd just be like "aight" drop a new version of itself and finish the job. Any enlightenment on the matter would be appreciated.
As a plan B, if I'm allowed to ask a quick follow-up question: is there any technical reason that would have prevented the designers of the virus to purposefully make it unable to mutate?