Sometimes. People think hockey is like a video game, where X line goes against X line and that remains until next stoppage.
QOC gets a lot more mixed up than that, and it usually ends up pretty negligible for players like this. Sometimes Leafs get to choose and they want Tavares on the hard matchup. Sometimes opponents get to choose and they want Tavares on the hard matchup. Sometimes Leaf get to choose and they want Matthews on the hard matchup. Sometimes opponents get to choose and they want Matthews on the hard matchup. Sometimes the opponent's 2nd line is trash. Sometimes it's elite. Sometimes Matthews will face a hard shutdown line over a top scoring line, which isn't necessarily easier. Sometimes he faces their best defensemen instead. Sometimes he's double teamed. A ton of times, lines change on the fly, or matchups are based on game situations. Opponents don't just forget Matthews exists. They know what he can do. He is prime #1 target for defending, and they do everything they can to stop him.