GTK4 apps do not use adwaita dark

GTK4 flatpak apps like Solanum and ToDO-devel (from gnome-nightly) are not using the adwaita-dark theme. Previously when setting this theme through gnome tweaks or settings.ini all system and flatpak apps respected it. Now only GTK4 system apps (tested gtk4-demo native RPM) respect the dark theme, but flatpak apps do not. Is there a workaround for this? How did flatpak initially detect the dark them and install org.gtk.Gtk3theme.Adwaita-dark?