Do not use Gfig to make a rectangle... (how did you get to the use of Gfig to make a rectangle?)
Use the rectangle select tool
to make your rectangle, and fill it with foreground or background color
https://docs.gimp.org/2.10/en/gimp-using...gular.html
https://docs.gimp.org/2.10/en/gimp-tool-...elect.html
Use the rectangle select tool

https://docs.gimp.org/2.10/en/gimp-using...gular.html
https://docs.gimp.org/2.10/en/gimp-tool-...elect.html