Palette keeps changing per frame with imported sprite sheet

I’m attempting to import a sprite sheet, and the palette is changing per frame based on what’s visible in the frame i’m guessing. Is there a way to make the palette a combination of all the colors from the spreadsheet for all frames?

Also lets say I make a new layer and paint in it, how do i keep that image for the rest of the animation eg: a background. Can i extend that frame longer?