If the ball is still in flight, the batting does not add new impetus. So that means Team A’s fumble is still the impetus when it cross the goal line. In this case Team B will get the ball at the spot of the fumble.
I disagree with bossman on this and think the rules read exactly along the lines of Shaw’s interp. Where a becomes dead is not always the same as where a dead ball belongs to a team. 8-5-1-a says it’s a safety if, “… [the ball] becomes dead by rule, and the defending team is responsible for the ball being there.” It doesn’t matter where the ball would belong to either team. The ball became dead in Team B’s end zone and Team B was responsible for it being there. It doesn’t matter that they aren’t in possession or that the dead ball may or may not belong to them.
And the reason the second situation is not a touchback because the touchback rule reads differently. 8-6-1-a says it’s a touchback if, “ The ball becomes dead out of bounds behind a goal line, except from an
incomplete forward pass, or becomes dead in the possession of a player on, above or behind their own goal line and the attacking team is responsible for the ball being there.” Team B is not in possession in their own end zone and the ball didn’t go out out of bounds, so it’s not a touchback.
I can see why Shaw ruled it that way, but I disagree the result of the play is a safety. Absent the 4th down fumble rule, the result of this play is a touchdown. Impetus and responsibility has nothing to do with touchdown plays. Given this has the 4th down fumble rule, it's still a "touchdown", but we bring it back to the fumble spot on the 4th down fumble rule.
We never ignore the 4th down fumble rule. It's not optional.
2. On fourth down before a change of team possession, when a Team
A fumble is caught or recovered by a Team A player other than the
fumbler, the ball is dead.
If the catch or recovery is beyond the spot of
the fumble, the ball is returned to the spot of the fumble.[/b] If the catch
or recovery is behind the spot of the fumble, the ball remains at the
spot of the catch or recovery.
So basically, your dead ball spot is the 4th down fumble spot. On other 4th down fumble plays, if we have a penalty, our basic spot is the 4th down fumble spot. It's as if the ball is instantaneously brought back to the spot of the fumble. We don't award a safety (or touchdown), then bring it back on the 4th down fumble rule, like we're accepting a foul. There's nothing in the 4th down fumble rule that implies it's optional.
I can see Shaw's logic too and I'm ok with the ruling, but I just think you always have to bring the ball back to the 4th down fumble spot when A recovers anywhere beyond, so the ball isn't actually dead in the end zone. Even if it is, the result is a "touchdown", not a safety.