While there isn't a universal standard, many of the direct-to-consumer brands with hub drives use off the shelf setups. The Reention Dorado is a popular battery for many of these brands (usually in one of two lengths).
Bikes with mid-drive motors like Shimano, Bosch etc., will probably be supported for a long time, meaning you can order a replacement battery even after a few years.
There's also many 3rd party "battery repacking" services out there, where you can get the existing case rebuilt with new cells.