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.
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.
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.