[OnePlus 3 & 3T Cross Device Development] anupritaisno1:
Before I answer your question about why the recovery doesn't get flashed it is necessary to understand why the flashing works the way it does in the first place

Firstly:

https://source.android.com/devices/tech/ota/ab/ab_implement

The important parts here are:

A/B devices do not need a recovery partition or cache partition because Android no longer uses these partitions. The data partition is now used for the downloaded OTA package, and the recovery image code is on the boot partition. All partitions that are A/B-ed should be named as follows (slots are always named a, b, etc.): boot_a, boot_b, system_a, system_b, vendor_a, vendor_b

The recovery RAM disk is now contained in the boot.img file. When going into recovery, the bootloader cannot put the skip_initramfs option on the kernel command line.

For non-A/B updates, the recovery partition contains the code used to apply updates. A/B updates are applied by update_engine running in the regular booted system image. There is still a recovery mode used to implement factory data reset and sideloading of update packages (which is where the name "recovery" came from). The code and data for recovery mode is stored in the regular boot partition in a ramdisk; to boot into the system image, the bootloader tells the kernel to skip the ramdisk (otherwise the device boots into recovery mode. Recovery mode is small (and much of it was already on the boot partition), so the boot partition doesn't increase in size.

And also read https://source.android.com/devices/bootloader/system-as-root

Unlike A/B devices that re-purpose /boot as the recovery partition, non-A/B devices must keep the /recovery partition separate as they do not have the fallback slot partition (e.g., from boot_a → boot_b). If /recovery is removed on non-A/B device and made similar to the A/B scheme, recovery mode could break during a failed update to /boot partition. For this reason, the /recovery partition must be a separate partition than /boot for non-A/B devices, which implies the recovery image will continue to be updated in a deferred manner (i.e. the same as in pre-9 devices).

Now that you've (hopefully) read 2 articles you probably understand to at least a small extent what's going on

Your phone has several partitions suffixed with bak. During an OTA upgrade the firmware partitions and the ROM are upgraded but these bak partitions store a backup of the previous firmware. The recovery partition is left untouched

If the new firmware or the ROM fail to boot the backup firmware is automatically loaded and the old recovery is booted. This is how A-only devices allow the user to recover from a bad system update

If the new firmware fully boots then a script /system/bin/install-recovery.sh is called to update the recovery with the new one. Read the script for yourself. It takes in the current boot image from the boot partition as a source, uses /system/recovery-from-boot.p as the patch and the recovery partition as the target. Modifying either the patch file (twrp renames it when you allow it to mount system partition read-write) or modifying the boot image on the boot partition (by flashing magisk, the verity disabler) the patch script fails and doesn't touch the recovery partition at all