hay i clean flash the rom but after flashing gap & magisk when i boot in system it ask for Password while i already remove my all passwords and when i entered my pass its say your password is correct however we need to do a factory reset than its boot in stock recovery every time , i flash the Stock using fastboot , and flash again but same problem, any solution for same???
Do wipe of system, data, cache on both A and B partitions.
Then without reboot install twrp and reboot to recovery.
Switch to A if not in A and install rom and twrp again(just to be sure). Reboot in recovery again (check in reboot menu after boot it should be on slot B). Install gapps(nano,pico or micro), magisk, any custom kernel (if you use) in that order.
Reboot system and wait... it should reboot twice switching the partitions automatically and then you'll see the big Star Trek Combadge . Then continue to normal login operations. The setup might ask you for PIN but it is cloud and should be the same as it was in the last backup your device has done to the cloud.
This is what is called clean flash.
Your issue might be from that you haven't wiped both A and B and you had some system data in one of the partitions left.