... then old settings and configs dont get erased, and that behaviour is expected,
Well as you didnt flash emmc, then old settings and configs dont get erased, and that behaviour is expected, so its your own fault . If you only flash main.bin then you need to add --erase-user-data=secure. "