Nicklas Backstrom, Tom Wilson and Conor Sheary scored for Washington (8-4-3), which has won two in a row after a four-game losing streak. Vanecek, a rookie, made his 12th consecutive start.
"He's given us an opportunity to win hockey games from the start of the year," Capitals coach Peter Laviolette said. "But I think what we were trying to do was put a better game in front of him. It's been a little bit better the last couple of games. But he's given us a chance. He did a good job tonight."
Victor Oloffson scored a power-play goal for Buffalo (4-7-2), which has lost four straight, three after a two-week pause due to NHL COVID-19 protocol. Linus Ullmark made 18 saves.
"It's a tough situation we're in right now," Sabres coach Ralph Krueger said. "This is now psychology. This is now persistence and character that we need to have to stick with it. Structurally, again we liked the effort, the neutralizing of Washington in a lot of phases of the game, but there's not enough up front for us to get away with winning games if we score one goal or no goals."
The Capitals took a 1-0 lead at 17:23 of the first period after Ullmark made a save on Alex Ovechkin's shot, and during the scramble Backstrom knocked in the loose puck for a power-play goal.
Backstrom has seven points (three goals, four assists) during a five-game point streak.