webkit2gtk-4.1 has been added to the GNOME SDK. This is the same as the older webkit2gtk-4.0 API, except it is built against libsoup 3 instead of libsoup 2, so it supports HTTP/2.
webkit2gtk-4.0 is now deprecated and will probably be removed in the GNOME 42 runtime. (We’ll ship both WebKits for GNOME 41.) If your application depends on libsoup 2, now is the time to migrate. Please note that libsoup 2 and libsoup 3 may not be used in the same process, so if your application depends on any libraries that use libsoup 2, they’ll need to be ported first before you can upgrade.
If you’re not able to port to webkit2gtk-4.1 before webkit2gtk-4.0 is removed, you can of course build it yourself in your flatpak manifest.