The fight should have been stopped at 3:17 of Round 5 when Whittaker stopped fighting and completely turtled up, which left the entire back side of his head exposed and him unable to see any strikes coming.
Instead, the referee did the opposite and warned Romero not to hit Whittaker in the head (only the back of the head was showing in Whittaker's complete turtle). This action by the referee stopped Romero's fight-ending onslaught of undefended and unanswered punches, thus allowing Whittaker time to recover and escape without being attacked.