In both plays, the team in possession put the ball into their own end zone. However, 10.3.1 occurred during a running play; and in 10.4.7 is a loose ball play (fumble behind the LOS).
Running play: enforce from the end of the run (goal line)
Loose ball play: enforce from the previous spot
See 10-4-7 and also: Special Enforcement Spots (10-5-2) "The enforcement spot for any foul by the defense is the goal line when the run ends in the end zone and would result in a safety."
There does seem to be an unfair advantage in 10.4.7 because A fumbled the ball while in his end zone (behind the LOS) - making it a loose ball play. If he had simply been tackled by the face mask, without fumbling, the foul would have been enforced from the goal line as well.