Some Zigbee devices unavailable

I have a strange problem with my HA. For background, in case that matters, I have HA setup on TrueNAS Scale together with mosquitto and zigbee2mqtt.

Now the problem I have is that some of my zigbee devices are unavailable in HA despite being completely fine in zigbee2mqtt. Importantly it’s NOT ALL devices - Inovelli switches all show up just fine, but e.g. SONOFF devices don’t. So it’s not some obviously systemic issues.

The devices become available if I just go to settings of the device and click Submit without any changes, but they disappear again after HA is restarted.

I used to be able to “fix” this by restarting zigbee2mqtt after restarting HA, however recently when I try to do that HA crashes and restarts when I restart zigbee2mqtt, so this “fix” doesn’t work anymore.

Any suggestions would be much appreciated!