Transparent background color is lost with saving a file as a gif

31 remained transparent, but areas indexed 32 and 33 were rendered black.

I don’t know if it’s related but I’ve always had troubles when my palette’s transparent color is not the first color in the table and the file was indexed.

You could try editing the palette and moving one of those transparent colors to the first index. Then try again (btw there’s a remap button in case your animation starts to look weird after switching colors in the palette).