Hi Takiro, I have the same problems doing pixel art. Recently I had to fix the same issue and I ended up doing the following for each of the colours in the palette:
- Select the colour and similar colours using the similar colour selection tool with a small threshold.
- Use the Fill tool on the current selection to re-colour all the pixels to the Palette colour.
As I had a larger palette I checked the number of current colours by generating a png and opening in Aseprite or Image Magick.
Make sure you use Nearest Neighbour as the filter when you get the option (e.g. in the Transform tool).