In my case (for now) downgrading mosquitto to 2.0.15 also helped.
My issue was that smart socket lost ‘switch/state’ entity thus I couldn’t control it from HA. In Z2M it was still available though. I bought few more plugs (different than the first one) and they worked for a day and also lost most important entity. After fixing mqtt it start working.
Let us know when we may revert 2.0.15 → stable in compose file.
I had exactly the same issue - one day all my Zigbee2MQTT devices stopped working without any reason - no updates, no changes, nothing.
I tried all advices in this thread, reinstalling the addon, changing credentials, server URL, restoring from an old backup, you name it. Nothing worked. No amount of restarts helped either.
What magically solved the issue was unplugging an plugging again the zigbee dongle (SkyConnect in my case).
The same issue some time happened on Zigbee2MQTT version 1.40.1 from 09.2024 updated.
It happens after restart HA a all, or reboot add on MQTT integrations.
For me helps restart Zigbee2MQTT docker container, or press reboot in Z2M GUI.
Settings - Tools - [Restart Zigbee2MQTT].