SearchEntry in a headerbar will wrongly maximize window on double click
When writing text on a SearchEntry, and then double clicking on the text, the expected behavior is that the clicked word gets selected. In GTK 4, not only it selects the word, but the window also gets maximized/minimized as if clicking the header bar.
Reproducer
import gi
gi.require_version("Gtk", "4.0")
from gi.repository import Gtk
def on_activate(app):
window = Gtk.ApplicationWindow(application=app)
header_bar = Gtk.HeaderBar.new()
search_entry = Gtk.SearchEntry.new()
header_bar.pack_start(search_entry)
window.set_titlebar(header_bar)
window.show()
app = Gtk.Application()
app.connect("activate", on_activate)
app.run()