This is done on Android 11 for Xperia 1 II (pdx203) 58.1.A.5.395
You need to have bootloader unlocked and rooted via Magisk (Not Magisk Delta, Alpha, Kitsune)
This guide will assume you have already rooted. Root guide can be found somewhere on the internet.
- Choose the option "Hide the Magisk app". Install it.
- Enable Zygisk, reboot. Make sure that "Enforce Denylist" is disabled.
- (Optional) Last line "Superuser Notification", set it to None to it won't send the toast notification on rooted apps.