GdkEvents in GTK4 are refcounted, and https://github.com/WebKit/WebKit/pull/2686 added GRefPtr support for them. We need to use it everywhere instead of GUniquePtr like in GTK3.
You found this problem first, but I already have a pull request open against bug #247092, so let's keep that one. *** This bug has been marked as a duplicate of bug 247092 ***