Why accessibility?
Android does not let a normal app know when you switch to another app. The accessibility service can listen for window changes — which app is in front — without reading what is on screen.
Offcat is not marketed as a general accessibility tool. It is a screen-time companion that needs this one signal to show the pause.