The switch alone is still “Optimised”: when idle, the phone still puts the app to sleep. It has to be “Unrestricted”. Do this before “Uninstall protection” — after it Android won't let you change the mode any more.
- Tap “Allow” — app battery usage opens.
- Find “KidPair — for the child”.
- Tap the words “Allow background usage” themselves — not the switch, the text (there's a small arrow next to it).
- Choose “Unrestricted”.