The following laws apply to a maul being driven into goal:
17.5 Successful end to a maul
. the ball is on or over the goal line
17.4 Offside at the maul
(a) The offside line. 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 maul. 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.
(c) Players joining the maul. Players joining a maul must do so from behind the foot of the
hindmost team-mate in the maul. The player may join alongside this player. If the player
joins the maul from the opponents’ side, or in front of the hindmost team-mate, the player
is offside.
These laws tell us that the maul exists until the ball crosses into goal.
The off side line for players not in the maul is the goal line.
17.4(c) still applies until the maul has ended so any player joining the maul must do so from behind the foot of the hindmost team-mate in the maul.
Once the ball crosses into goal players can run around, dive in from the side etc, etc but by then it will moot unless he can get under the ball for a 'held up'.