To start, I believe it was a goal, but
The rule states that the play is dead when the referee rules it dead, no on the whistle. This takes into account the delay to bring whistle to the mouth. So it doesn't mean a thing that the puck was in the net prior to the whistle.
Why the puck was ruled frozen though is beyond me, the ref clearly had a look at the puck, so he did not lose sight. The goalie also clearly has not frozen the puck. It should be a goal, and I'm trying to figure out why the ref deemed the play dead.