Best practice for message retention with Zigbee2MQTT?

I run both HA and Zigbee2MQTT in docker containers.

My Zigbee2MQTT installation is fairly vanilla - the default is for all MQTT messages is retain=false. As a result whenever I restart the HA container it loses track of all MQTT devices - until one state change is received from each device.

I could make a one line edit to the Zigbee2MQTT configuration to change the default so that all messages are retained by default, however I have seen issues in the past with battery powered MQTT scene switches re-triggering on HA restart, if their messages are retained.

Therefore, what is the best practice for message retention with Zigbee2MQTT?

Adjust the config to retain the values in MQTT.