Tonight I upgraded Lineage on one of my devices but after flashing magisk I got stuck in a bootloop. The fix was quite easy once i figured out that it was probably not magisk itself but one of my modules that was incompatible with the new OS version.
Even in the bootloop I had access to the device over adb so I tested removing all the installed modules with the following command.
adb wait-for-device shell magisk --remove-modules
The device rebooted and this time it booted just fine
Hope this can help someone save some time in the future