I've tried with and without data at least 20x each honestly. Usually flashing 10g before 20b, tried with unlocked partitions, custom built NV partition, unsecured block 0 partitions,factory reset and reflashed partitions after command not workin...
I have read that orange Fox recovery works better with Android 10 than twrp. If anyone is capable of settng it up maybe we can use it instead.
Once you root it will not install ota. You can simply flash stock recovery though spflash tools and install the update. Then go back and root again.
When I unlocked the bootloader I also unlocked critical areas
fastboot flashing unlock_critical
Warning---- this will wipe your phone again just like the bootloader unlock.
Magisk 20.2 was what I used. Then flashed the boot through fastboot using Debian Linux.
Rooted f2 boot IMG