You can run Shizuku in ADB privileged mode (running a shell command through ADB that starts a service so other apps can access that same privilege), or run Sui, a Magisk module that provides a same service but with root access instead. The ADB privileged version doesn’t trip Knox since it doesn’t require unlocking your bootloader, but Sui/Magisk most definitely will.