Expand Root Script Not Working on OpenWRT 24.10.0 (Raspberry Pi 5)

Wonder what sets the root= to the partition id. I have this every time I sysupgrade, it reverts back after I changed it. I use the scripts too. I can't see where the script would update this.

Edit

1st and 6th result looks interesting.

Google suggests partuuid is based on the sector start/end so changes when you resize the partition. Could perhaps get the new partuuid and replace it in the cmdline.txt with something like

NEW_UUID=`blkid ${ROOT_DISK}p${ROOT_PART} | sed -n 's/.*PARTUUID="\([^"]*\)".*/\1/p'`
sed -i "s/PARTUUID=[^ ]*/PARTUUID=${NEW_UUID}/" /boot/cmdline.txt

This could be added after the line "touch /etc/rootpt-resize" in the first script on https://openwrt.org/docs/guide-user/advanced/expand_root. I will test this out tomorrow maybe.