gif might not work with the program due to the palette limitation. Converting to png, though, might agree more with the upscaler without affecting the source quality.
If I'm not mistaken the maximum colors used in any of the games is 243 or so. One of those early Windows restrictions to allow system colors to occupy the remaining 13 or so slots.
GIF should work, though later games may have pushed closer to 256. I'm quite sure none of the SGS system games of them use more than 256 for the animations due to the ANM format only supporting 256 color palette. (M3's newer format may extend this.) Perhaps a few of the maps in RSR, GTB, or F50 that are bitmap format instead of ANM could be over 256 colors, but these images wouldn't be used in animations.
The real problem with upscaling, regardless of whether PNG or GIF (or even BMP) used as source, is that it typically blurs the edges and introduces new color pixels, making it >256 colors. When you convert this back to GIF, you need to reduce the palette to 256 colors again, and by using default features of software this can introduce new artifacts or colors that aren't accurate to original. The proper solution is to take the palette of source image, and after upscaling, apply that palette such that the upscaled image now matches the original 256 color palette before including it as a frame in the GIF file.