Random image stop working on Android 12


I'm using KLWP on my Pixel 6 Pro. Everything works perfectly but the random image doesn't work properly because of it stop working after unknown time. This is the formula;

$tu(rndimg, 30, "/sdcard/Documents/wallpapers")$

I have disabled the battery optimization did KLWP but continues without working.

Any suggestions?