I could absolutely live with the following interpretation of the current rules:
B brings the ball into their own end zone via momentum. After B gains possession of the ball, team B commits a live ball foul. The basic spot for enforcement is determined as with any other play:
If the foul occurs while B is in possession, it is a running play and the basic spot is the end of the run.
If B fumbles the ball (as in the scenario posted) and the foul is after the fumble, loose ball foul, basic spot is previous spot (aka, end of the run).
In either scenario, the momentum exception to the end of the run kicks in because the force into the end zone was the momentum of B, and the basic spot is the spot where B gained possession.
If B carries the ball out of the end zone or either team gains possession of the ball in the field of play after the fumble, then momentum is off the table (as it is now). This only fixes the "B fumbles the ball into the field of play, but nobody gains possession before it goes OOB at the 2" quirk.