Stuck on shutdown `config failed, hub doesn't have any ports! (err -19)`

Sometimes when I shutdown my system it gets stuck and doesn’t shutdown, if I press Esc on loading screen I see this:


It never happens when I shutdown on fresh boot, so I’m guessing something is triggering this after a while after it is booted.

I am on Fedora 41, kernel version 6.12.8-200.fc41.x86_64, CPU: Ryzen 5 6600H, GPU: RTX 3050M

What is the flatpak-io application it’s trying to shut down in the second picture?

It’s io.github.zen_browser.zen

I’m not sure but I think it might be related to charging, because it seems to tend to happen after plugging/unplugging laptop from the charger