You only get that dialogue with a RGB image.
Just a comment about your test.
You are using a 3 x 3 pix image, so any 'overhead' such as colour space info or a color-map for an indexed version will be very noticeable. That overhead is not as noticeable on a larger images, and usually makes an indexed image file size, smaller than a RGB image.
A comparison: The Win Paint & Gimp (no info) images = 90 B
Gimp (with colorspace info) = 174 B
Gimp 2.10 indexed = 158 B This was broken in Gimp 2.10.22 and fixed for Gimp 2.10.24 however a Gimp 2.8 smaller at 142 B, so something changed for the worse.
You using Gimp 2.10.22 ? Do you get an
Unrecognised or invalid BMP compression format. error ?
You need to update to Gimp 2.10.24 see:
https://gitlab.gnome.org/GNOME/gimp/-/issues/6114