Sen. Bernie Sanders continues to rake in contributions for his presidential run despite remaining a clear underdog in the race for the Democratic nomination, all but ensuring his battle with Hillary Clinton will continue for months.

Mr. Sanders’s latest fundraising haul—$44 million in March—was amassed as his path to the nomination narrowed substantially, leaving him with a daunting deficit in convention delegates. Such a feat amounts to defying political gravity, campaign-finance experts say: When candidates start losing...