When writing a raster with a palette to a format that does not support palettes the following error will appear:

This format cannot support palettes. Consider removing or resolving palettes that are attached to the raster.

To fix this use a RasterPaletteResolver.  This transformer resolves the palettes of the selected bands of the input raster features by using the band cell values to look up the corresponding palette values, which then replace the original band cell values in the raster.