It can be lonely for a hockey player, sitting on the end of the bench, knowing you’re unlikely to play, with nothing to do but encourage your teammates.

Canadiens defenceman Arber Xhekaj experienced that feeling Thursday night, limited to one three-second shift in the third period of Montreal’s comeback 4-3 overtime victory against the San Jose Sharks. But he also understood head coach Martin St. Louis’s decision and was willing to accept his penance.

“I was a little off my game, a little off defensively,” Xhekaj admitted Friday morning, after the team practised at the CN Sports Complex in Brossard. “I made a bad pinch in the second period. I mean we’re chasing something pretty important here. If you’re off or you play like s— you’re going to sit. There’s no hidden recipe behind it. It’s just how it is.

“The plan wasn’t to sit me the whole period. It’s just the way things worked out. I was a little off, so I sat on the bench and watched. I know it’s an off-night for me (but) I’ve been playing some good hockey lately. You can’t play 82 perfect games. It’s a hard league. For what we’re chasing right now, every guy’s got to be pretty close to perfect. I sat and watched and cheered my team on, make sure everyone was going. I was talking on the bench still and made sure we won the game.”

Xhekaj was limited to 12 shifts and was on the ice for a team-low 10:48, but was on for only one of the Sharks’ three even-strength goals. He also had one hit and gave the puck away once. The 6-foot-4, 240-pounder has one goal and six points in 56 games.

The good news is St. Louis doesn’t hold grudges and has a short memory, it seems, where these matters are concerned. He knows Xhekaj’s value to the team and expects him to rebound Saturday night, when the Canadiens travel to Buffalo (7 p.m., City-TV, SNE, TVA Sports, TSN Radio-690, 98.5 FM). The teams meet again Monday night at the Bell Centre.

Forward Josh Anderson, who clearly is battling lower-body injuries, received a therapy day Friday, but will accompany the team to Buffalo. Jakub Dobes, who hasn’t played since Feb. 9, against Tampa Bay, is the starting goaltender.

St. Louis said he attempted to get Xhekaj more playing time in the third period, but circumstances forced his hand.

“He (Xhekaj) had plenty of runway (Thursday),” St. Louis said. “I just didn’t feel it was his game. In the third period, we were chasing the game and I thought (Lane Hutson) was going good. I gave a little bit of extra (ice time) to Lane. My goal was not to (bench Xhekaj) the whole third. We got to a point where I felt OK, he got the message, but then it wasn’t the right match-up for him to jump on the ice. Then we got back-to-back power plays, and now we’re down to about seven minutes left in the game. He has been sitting for almost too long. I kind of missed that window. At that point, you’re just setting him up for failure. It’s a 3-3 game. I wasn’t planning on that. It just went that way.

“We need (Xhekaj) and he’s fine. He’s going to play in Buffalo. I’m not over-thinking my decision and I don’t think he is, either.”

While Xhekaj had his struggles against the Sharks, fellow defenceman Jayden Struble has raised the level of his game since being paired with Hutson. Struble had an assist against San Jose and is riding a three-game point streak after going 14 games without a point, dating back to Nov. 27. And with the Canadiens down to six healthy defencemen since Kaiden Guhle’s injury, Struble doesn’t have to worry about being a healthy scratch.

“I just give (Hutson) the puck and it seems to find a way into the back of the net,” Struble said. “It has allowed me to focus on getting out of the defensive zone for him. Try to play fast, have a good stick and bring the puck out because I know the more time we’re in the offensive zone, the more time he’ll be able to do do everything he can do.

“He’s great at making plays, great on the break-out. It has been pretty easy.”

Kirby Dach underwent successful surgery to his right knee and will miss the remainder of the season. He’s expected to recover before the start of next season. Dach was limited to two games during the 2023-24 season after tearing both his ACL and MCL.

The Canadiens are on a three-game winning streak for the fourth time this season and already have defeated the Sabres twice, outscoring them 13-6. While Buffalo (24-28-5) is last in the Atlantic Division, it has won six of its last 10.