If you are using Ubuntu 21.04 Gnome is 3.38. If you are using Ubuntu 21.10 Gnome 40.2 is part of the Ubuntu Development series and GTK is not yet fully supporting Gnome 40.
Bottom line is Gnome 40...