Will not run on Fedora 40 or 42 due to GTK error

How do I fix this error: “Gtk-ERROR **: 15:01:57.957: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported” when I try to run it on Fedora 40 and Fedora 42?