In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer memory and file storage, while speeding up display refresh and file transfers. It is a form of vector quantization compression.
When an image is encoded in this way, color information is not directly carried by the image pixel data, but is stored in a separate piece of data called a palette: an array of color elements.
So you must change your image mode to RGB > Manage your Project as layered file > convert to indexed mode again (Flat Image).

RGB- This is the default mode, used for high-quality images, and able to display millions of colors. This is also the mode for most of your image work including scaling, cropping, and even flipping. In RGB mode, each pixel consists of three different components: R->Red, G->Green, B->Blue. Each of these in turn can have an intensity value of 0-255. What you see at every pixel is an additive combination of these three components.
Indexed- This is the mode usually used when file size is of concern, or when you are working with images with few colors. It involves using a fixed number of colors (256 or less) for the entire image to represent colors. By default, when you change an image to a palleted image, GIMP generates an “optimum palette” to best represent your image.
I think There is no way to edit the file as layered in Indexed Mode.