Try this:
Download from FP5 · master · ota / release · GitLab the file iode-6.5-20250701-FP5-fastboot.zip, unpack that file , in the zip archive ist another zip file iode-6.5-20250701-FP5-img.zip, unpack that zip file and then you have a boot.img.
Copy this boot.img to to phone, open Magisk and patch the boot.img. The result is a file called magic_patchedxxx.img. Copy this file to your PC, change the phone in fastboot mode and than flash the file via fastboot flash boot_a [path_to_file]magisk_patchedxxx.img and or fastboot_b
This is how I patch the boot img on my Sony XZ2