OnDemand rules not always work

we developing app that use vpn to prevent user to brows to fishing website by redirect to blocking page
i try all the combination off OnDemand rules
but still some time when the phone return from sleep / bedtime vpn stuck on connecting state and the device internet trafic are stuck and the only way to start von again is by manually set the vpn switch from setting to close and it starting again
any idea what i'm doing wrong and also maybe it an iOS bug ?

Replies

any updates ?