Theoretically, an amp hour is an amp hour. But vendors sell based on theoretical capacity, not real world watt meter tested capacity. And alas, sometimes vendors just plain lie, but that is easy to tell just by price. If you are buying a 48v 20 ah battery for 200 bucks, they are lying.
But back to real capacity. you can make a pack using cells that are rated to add up to 48v 20 ah, but the combination of the bms, and the charger supplied, results in a full charge being a bit less than 4.2v, and the bms may cut off before every single cell in the pack is empty. Its supposed to do that, protect from both overcharge and under charge. And the result may mean a few watt hours less.
Then there is lipo. If you mean RC packs, they come with no bms. This means, if you are smart, you stop very conservatively early. And you may choose to slightly undercharge, since there is no bms. The combined result can be that you routinely use only 16 ah, out of a 20 ah potential.
Then there is wear and tear. With very cheap cells of any type, real world capacity can drop quite quickly, in months rather than years. This can happen because each cell is simply being stressed too hard by the discharge rate. The more stressed the pack is by the discharge rate, the lower the real world capacity will be.
BTW, those Ah ratings for each cell, they do those with a test at very low amps. Real world amps are nearly always a lot more than the test. So your rate of discharge can vary a lot depending on the size of the battery, and how its discharged, and can result in big differences in real world capacity. Different types of cell can stand higher rates of discharge. In general, the RC type lipo has much higher ability to discharge at high amps, but also can wear out extremely fast if amps are extreme. Great choice for the drag strip, but maybe not so great choice for the commute.
However, if you size your battery correctly, meaning it is large enough and results in a low rate of discharge, closer to the test rates, then each type should have very similar range per amp hour.
Lastly, when you get down to the last amp hour, a battery that can discharge to a lower voltage will result in lower speed at the end. This is because your speed is determined by voltage, and if volts are lower at the end, you are slower in the last few miles.