That is the law of the game. Apparently the VAR official realised the error after the restart but failed to notify the referee.
I think what should of happened is the referee should have been told of the error. Ref stops the game and goes to the bench. Discuss situation with both managers and...