Would that only happen if I installed the update in TWRP or even if I installed a LineageOS OTA?
BTW, I also tried the 999-flashafterupdate script hoping it would reinstall the alternate kernel I was using. It didn't. Magisk and TWRP were retained but the kernel didn't get reinstalled. Now that I think about it, if the FlashAfterUpdate did happen after the 98-twrp and 99-magisk scripts wouldn't it have wiped the twrp and magisk? How are these supposed to work together? Would I get rid of the twrp and magisk scripts and just place all 3 of the files into the FlashAfterUpdate directory? Are they flashed alphabetically?
I wouldn't even trust adding an addon.d-v2 script with Magisk for booted custom ROM A/B OTAs since Magisk's overlayed mounts might not work as expected for the ROM's backuptool script reading and copying over the /system/addon.d directory.
Something changed with something since before my going on pat leave and FlashAfterUpdate addon.d-v2 support seems broken, not sure if for everybody, I haven't had time to look into it yet. Yeah, they're in the order of the files in the directory, which is alphanumeric sorting.
TWRP, Magisk and AnyKernel3 all coexist fine, but it basically has to be in that order.