I’ve done more research since I wrote this. I’m not sure if this is true “for almost every viral disease with a vaccine”, but it might be true for many or most of them.
The big ones I know of where it’s not true are smallpox and polio. Smallpox we don’t have great data on because its vaccine was invented so early (1700s), but there’s no reason to believe that its mortality rate was dropping significantly; in general big mortality rate drops didn’t occur until later.
Polio we do have good data on, and it’s clear that the epidemics continued, and indeed got worse, until the introduction of the vaccine in 1955. Polio is something of a special case in that it was not improved by sanitation.
Other diseases seem to have been ameliorated through sanitation, hygiene, and perhaps nutrition. I go into more detail on this in “Draining the swamp: How sanitation fought disease long before vaccines or antibiotics”.