As a Leafs fan and Matthews glazer, you just do not leave the front of the net. Not when it's Connor F****** McDavid in the slot.
Fox absolutely lost his guy but you stop the threat, Marner along the boards isn't the scoring threat in that situation. Plus as the C, the slot is his duty. It was an overall defensive breakdown, but regardless of Fox losing his man, you don't leave the front of the net to challenge a passer along the boards.
The entire purpose of defense in hockey is to stop the play from advancing. Sometimes it's by using the body to separate the man from the puck, sometimes it's positioning to cut off a passing lane, sometimes it's having a good stick to force passes to the outside/non-threatening areas. In that situation the play is, cover the slot, challenge McDavid for position and tie his stick up. Just make it difficult for him to receive the puck/shoot the puck.
Fox being out of position allowed Marner to have time to make a pass or a play. Matthews going out of position allowed McDavid to become an immediate high danger scoring threat.
I think Matthews had a very strong game overall, he was phenomenal the entire night IMO except that play. And unfortunately that play sealed the game. I'm sure he's going to learn from it, but you absolutely just cannot do that. It's just shitty because he had such a great game prior to that, but the error was so big it over shadows the 2 assists that even got the game to OT + the 2 dangerous scoring chances he had.