What feature of Android provide security to reset the /system changes on reboot? I am stuck in a weird situation where I have two Android 10 phones from Samsung. I have rooted the stock recovery of both device as instructions given here. The problem is when I change something via recovery like create a new /system/etc/init/custom.rc file then on One device it persist on /system after reboot but on another it doesn't. The changes does persist when I reboot to recovery back.

I want to understand which layer of Android applied this feature:


Kernel
Stock recovery
System
or another


Any suggestion? and how to fix it?
Removing avb checks form boot.img/ramdisk/fstab.qcom has fixed the issue.