The ref should be focusing on the puck crossing the line because the ref can not see things going so fast to determine correctly if contact with the goalie happened moments before, during or after the puck found its way, and any contact with the goalie should result in no goal.
I say this because defencemen are are powerless against forwards park in the net because they get called for hooking, holding, roughing, sneezing, coughing, or just merely breathing on the forward, yet a forward can go into the blue paint and remove limit any efforts that could be made by the goalie to challenge the shooter and make a save, and if he reacts to the forward being in the blue paint, he gets called for it.