The interfaces and the external dimensions can remain the same even as the internals change though, right? And you can have more or fewer cells. The cells don't have to be cylinders, either. They can be flat.
Besides it's pretty easy to get custom battery pouches made.
For older phones, the batteries we buy are likely also old stock left over if we can find some in stock anyway, right?