Default Screen does not lock or turn off, need help.

I can not turn off or lock the screen anymore, neither by pressing the power button nor by using a lock screen app.
I changed nothing, it just stopped working.
When i longpress the power button, the shutdown menu shows up as usual.
Even after restoring an older backup, the problem still exists.
When i wipe everything and install my rom again, the normal function is back.
Sure, i could just reinstall everything but i first want to ask if somebody knows a fix for this issue in case this happens again in the future.

Thx for helping

Gesendet von meinem SM-N9005 mit Tapatalk
Device: SM-N9005 international, Snapdragon (hltexx)
ROM: ROM: BoBCaTROM_EVO_7.01
Kernel: CivZ 2.2
Mods: ViPER4Android Audio Effects
KNOX 0x1 enhanced user experience