Export a Packed Sprite Atlas with JSON
When animation frames contain a lot of empty space or repeat the same drawing, a packed atlas can store less image data. The matching JSON tells your importer how to put each frame back in place.
Check how the sheet will be imported
Choose a packed atlas only if your destination can read frame rectangles and trim offsets from metadata, either directly or through your importer. If the destination slices a PNG into equal cells, use Grid instead. The regular sprite sheet tutorial for Unity shows that grid workflow; it does not import a packed atlas.
For a small test, open an animation with two identical drawings and a transparent margin around them. Give them different frame durations so you can verify that reusing a rectangle does not collapse two animation steps into one.
Pack the frames and keep the metadata
Choose File → Export..., then Sprite sheet. Set Sheet layout to Packed atlas. Start with Trim transparent edges and Merge identical frames enabled. Trimming removes empty borders from the rectangles stored in the atlas, not from the editable project. Merging lets identical drawings reuse one rectangle.
Enable Export animation data (JSON). Check the atlas dimensions and unique-frame count before exporting. With two identical drawings, the preview should report 1 unique / 2 frames. Keep the PNG and JSON from the same export together.

Use padding and extrusion for different jobs
Padding leaves space between packed regions. Edge extrusion copies colors from each region's outer pixels into a border. If sampling in your game pulls stray colors from the next sprite, start with a small extrusion and enough padding to separate neighboring regions, then check at the game's actual scale.
Neither setting fixes an importer that is reading the wrong rectangle. Read the frame coordinates from the JSON rather than measuring the visible blocks or their extruded borders by hand. See Exporting artwork for sheet scale and metadata options.
Verify the animation in its destination
Play the imported animation. If a frame jumps when it should stay still, check whether the importer uses the trim offset and original frame size. If a repeated pose plays too quickly, check that both frame entries and their durations were retained, even when they point to the same rectangle. If your importer cannot use that metadata, export a grid sheet instead of trying to recreate missing placement by eye.