Workflow for codecs installation broken
The workflow for codecs installation has been broken for a long time, and that unfortunately didn't get any better.
The codec installation helper doesn't spawn a dialogue, it spawns an application window, which it doesn't parent to the application, meaning that when codecs installation has finished successfully (or not), playback will start even though the application isn't visible (Software is still in front of it).
totem, the PackageKit helper and gnome-software don't support parenting on Wayland. Look for create_external_window_from_handle
in xdg-desktop-portal for how to add Wayland support.
Even if parenting worked (in X11 for example), the window launched isn't a temporary dialogue, it's the full application window, meaning it's possible to continue interacting with the app after codecs installation has finished.