So I took a gif, and edited out the background for each frame.
When I go to filters -> animation -> playback it plays the gif perfectly fine with a transparent background.
https://i.stack.imgur.com/Vce0E.jpg
After exporting the gif and opening it up on an image viewer, the background is gone, but instead of it being transparent, it's turned into a white background.
https://i.stack.imgur.com/70E5Y.jpg
I've tried using optimize for gif, but it doesn't change anything. I also have tried exporting the gif as both png and gif format.