The thing is GIF's are a fickle file format.
People don't realise, or understand, that an animated GIF is usually created using ONE FULL background layer and then every other layer is just the DIFFERENCE.
The rest of the layer is transparent.
When the GIF is saved the 'frames' are created as FULL frames....no transparency, but this is done with considerable compression...down to 256 colours as opposed to 16.7 million.
When people open a GIF file they see all the layers as FULL but this is NOT how the GIF was created....its a 'flattened' version of the layers used.
In your case I simply kept layer 1 visible for EACH frame and then masked out everything that didn't change in all the other layers.
This means when the GIF is saved its much smaller as it is not saving repeated information.
The first image I uploaded used a simple rectangular mask, starting just left of the woman and the bottom of the train window down to bottom right.
View attachment 72190
The second one I used the Lasso tool and made a tighter mask around the movement....taking care to keep the shadow on the wall.
View attachment 72191
You can have a marquee visible and go through each frame making sure the movement in each frame is still encompassed by the marquee...if not adjust so it is.
When you have the mask you can just duplicate it to each layer...
View attachment 72192
The above shows frame #2, frame #3 would have Layer 1 AND layer 3 visible....and so on and so forth...etc, etc, yada, yada, yada, blah, blah, blah.
Regards.
MrToM.