Even though referees make plenty of mistakes, let's be fair.
There has been mention in the posts that the offide line proposed by Harfish was incorrect as the line should be where the last player on their feet was. There is no mention in the laws of the last feet belonging to a player on his feet.
Law 16.5 (a) says:
There are two offside lines parallel to the goal lines, one for each team.
Each offside line runs through the hindmost foot of the hindmost player in the ruck. If the
hindmost foot of the hindmost player is on or behind the goal line, the offside line for the
defending team is the goal line.
Therefore the offside line drawn by Harfish is correctly placed.
There has also been mention that the ball was out because the halfback had his hands on the ball. The ball is not out just because the halfback has his hands on the ball. Once the halfback places their hands on the ball, they must play it but it is still not out until it leaves the ruck, which is generally considered to be once the halfback picks it up off the ground.
The management guideleines say:
* The ball is out of a ruck or scrum when it is totally exposed or it is clear of bodies
* If the ball is being dug out (after being won) or is under the feet of players at the back of the Ruck, the half cannot be touched until the ball is clearly out of the Ruck.
*The benefit of any doubt should go to the scrum half
* Once the scrum half puts his hands on the ball he must play it
*"Ball out" may be called if it is unclear
So, I think Beale was offside - he was in front of the offside line when the ball was still on the ground, regardless of the fact that the halfback had his hands on it.
The referee awards the penalty for offside, not for diving over the ball. That is clear as he runs to the spot where Beale was to award the penalty.
The referee got this one right.