Flash with adb again TWRP. Magisk must be uninstalled with magisk Uninstaller.zip (flash with TWRP)
Link is in #1 in Point 3)
Before you uninstall Magisk copy the extracted RECOVERY.IMG (from b398) to your external SD.
After flashing Magisk Uni...
It's called Pocket mode. You can find in the Dialer/Settings/Pocket mode, it's not a bug ;).