The offside would be negated once the puck left the zone. You can only challenge the offside if a goal is scored before the puck leaves the zone or the other team touches up.
Team A is down by one, Team B brings the puck into team As zone with say 45 seconds left in the game offside but it’s not called.
Team B keeps the puck in team As zone and with a couple seconds left a team A player finally gets the puck and shoots it into his own net.
Of course everyone is like WTF. but the player is smart and has his coach challenge the offside since a goal was scored.
Team A wins the challenge so no goal and the clock is reset at 45 seconds.
As a bonus team A ties it then wins in OT.