Will it retain the settings? Likely. The question you should be asking is, would it be better to do a hard factory reset and configure Asus-Merlin from scratch to avoid any weird issues that may crop up when moving from stock firmware to Asus Merlin? Most will suggest doing a hard reset if moving from stock to Merlin or other non stock firmware. Further it is generally not recommended to reload saved configuration settings from a different firmware version. It is generally recommended by many to remove any router attached USB hard drive as well when updating the router firmware.
If you haven't done so already see the Asus-Merlin Installation wiki post for general suggestions when installing Asus Merlin:
https://github.com/RMerl/asuswrt-merlin.ng/wiki/Installation
Edit to add: And once running Merlin one can install YazDHCP add-on script that helps preserve reserved client DHCP IP addresses.
v1.0.6 Updated 2023-11-18 Feature expansion of DHCP assignments using AsusWRT-Merlin's Addons API to read and write DHCP assignments, increasing the limit on the number of reservations. YazDHCP is free to use under the GNU General Public License version 3 (GPL 3.0). This project is hosted on...
www.snbforums.com
Feature expansion of DHCP assignments using AsusWRT-Merlin's Addons API to read and write DHCP assignments, increasing the limit on the number of reservations. - jackyaz/YazDHCP
github.com