Xiaomi Aqara Window/Door Sensor not working correctly with ZHA component

I use an Elelabs Zigbee hat device
I’m using Home Assistant
The window sensor is added as binary_sensor.lumi_lumisensor_magnetaq2_…
but when Home Assistant is restarted the device is no longer visible as an entity

elelabs knows the problem but says that comes from HA