de0u The parts not covered by the standard verified boot are wiped on factory reset so it should be fine. The standard verified boot is that it doesn't work properly without a factory reset because system APKs can be replaced by an attacker without it being detected. It's still always better to factory reset regardless, but our verified boot is significantly better. Google will likely eventually ship the APK verification we provide, but they aren't even using it in a non-enforcing mode without security value yet. It's possible they'll get to the non-enforcing stage with Android 15. We aren't sure what's holding it up.
Flashing the OS again is barely better than relying on verified boot since flashing the OS still depends on the early boot chain stages not having their verified boot system exploited. You flash the OS from fastboot mode, which is simply an alternate mode of the same firmware stage which loads the OS. Verifying the core OS is a very simple part of the firmware code.
A factory reset is performed by booting recovery which is a boot mode for the OS, but recovery barely uses any persistent state.
The only reason flashing is slightly more secure than simply doing a factory reset is that there's some extra verified boot attack surface for verifying the OS rather than only the early firmware. This shouldn't matter to most people. Only a very sophisticated attacker is going to even make a serious attempt to exploit the verified boot process on Pixels where it's very well implemented overall. It's a lot harder than exploiting the OS remotely, etc. when talking about persisting past a factory reset. Persisting through regular reboots doesn't require an exploit other than to escalate privileges, and the stock OS doesn't prevent replacing system APKs via malicious updates in that threat model which is a huge hole making it far simpler than it should be. There are other holes in it for the broader threat model of defending against privileged persistent between reboots beyond the system APK issue we resolved, but the other issues are less serious.