I'm not sure of the origin of your problem, but here is one of the many reasons it can happen

this is a test i made with this kind of "pen" in gimp Click image for larger version. 

Name:	Annotation 2020-07-08 131310.png 
Views:	30 
Size:	12.4 KB 
ID:	123842*

As you can see it on the zoom below, it's not plain black : you've got a gradient of grey around the pencil line
Click image for larger version. 

Name:	Annotation 2020-07-08 131311.png 
Views:	23 
Size:	2.6 KB 
ID:	123843

I fill with the bucket and a "seuil" (treshold in english?) of 0 :
Click image for larger version. 

Name:	Annotation 2020-07-08 131312.png 
Views:	32 
Size:	20.3 KB 
ID:	123844

As you can see, it doesn't fill the grey parts : the treshold=0 means that it earches the exact color value of the pixel you have click on around, filling with your color. In may case, i clicked a pure white pixel. It stopped on the grey pixels


The same line, same bucket filling with an increased treshold
Click image for larger version. 

Name:	Annotation 2020-07-08 131313.png 
Views:	29 
Size:	15.9 KB 
ID:	123846

More pixels are filled

Hope it will help you