Mac is confused about the display

How to choose screen resolutions within System Preferences

Choose Apple menu  > System Preferences… > Display > Resolution. Then hold [Option Key] while clicking at Scaled. Without holding you can just change the size of text and objects on your screen; but clicking Scaled while holding the [Option Key] you can switch between screen resolutions.

For better understanding see both variants in the screenshots:

Example by selecting 'Scaled' without pressed ⌥-Key

Example by selecting 'Scaled' with pressed ⌥-Key

Proper detection of the external display

Side note: Maybe it could be interesting which display has been recognised by macOS. Just choose Apple menu  > About This Mac > Displays. It should show something like…

Integrated Retina-Display
16-Inch (3072 x 1920)

…for the internal display.

How about the external display? Does macOS recognise the attached Gigabyte M27Q properly?

Addendum to my previous suggestion in order to fix the primary problem

As Display profiles are stored under Color it was not obvious that this might be the profile you just have to delete it.

I do not know if it works, but it's worth a try:

enter image description here