Failure to flash Orin with cloned system.img

Please try to modify allocation_attribute of APP from 0x8 to 0x808:

Linux_for_Tegra/bootloader/t186ref/cfg/flash_t234_qspi_sdmmc.xml

<partition name="APP" id="1" type="data">
    <allocation_policy> sequential </allocation_policy>
    <filesystem_type> basic </filesystem_type>
    <size> APPSIZE </size>
    <file_system_attribute> 0 </file_system_attribute>
-   <allocation_attribute> 0x8 </allocation_attribute>
+   <allocation_attribute> 0x808 </allocation_attribute>

And flash again with -r parameter
$ sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1