Do you use a subnet with dynamic prefix enabled?
It whipes all leases when a new wan event happens cause there could be a new prefix:
https://github.com/opnsense/core/blob/7bbd7a3c4a3d8a91a0c18b2ea203e00c9bc891c5/src/etc/inc/plugins.inc.d/kea.inc#L203
https://github.com/opnsense/core/blob/7bbd7a3c4a3d8a91a0c18b2ea203e00c9bc891c5/src/opnsense/scripts/kea/kea_prefix_renew.py#L46
If there is some issue here please open one in the core repository.
It whipes all leases when a new wan event happens cause there could be a new prefix:
https://github.com/opnsense/core/blob/7bbd7a3c4a3d8a91a0c18b2ea203e00c9bc891c5/src/etc/inc/plugins.inc.d/kea.inc#L203
https://github.com/opnsense/core/blob/7bbd7a3c4a3d8a91a0c18b2ea203e00c9bc891c5/src/opnsense/scripts/kea/kea_prefix_renew.py#L46
If there is some issue here please open one in the core repository.
"