hopefully, I manage to explain this well.
The way I have seen it done is to divide the graphics into tiles (in this example 32x32), remove duplicates, and piece them together in the game engine to save resources and file size.
Typically, making tiles square is recommended as it makes it easier to work with grids in game engines.
example: The pink rectangle would represent the tile below it as the tile you save, then the down arrows would be where a copy of that single tile would go when reassembling the full graphic in engine. the same process would apply to all tiles, and each frame would have the same treatment.