08-06-2023, 08:42 AM
Usual problem with anti-aliasing pixels on the edge of things. The bucket tool fill has a "fill by line art detection" that works fine very often. Otherwise, if the outline is on a transparent layer, fuzzy select the transparency, Select ➤ grow by 2px to have the selection cover the edge pixels, and bucket-fill in Behind mode. You can also use Behind mode with the paint brush (and this can be faster, since you don' t need to be extra-accurate, the Behind mode will "protect" the lines).
Some more info on anti-aliasing pixels and handling them properly here.