We’ve seen some odd behaviour due to corrupted settings on an S9 with May 2020 security patch.
Our service was being recreated and restarted whenever there was a user-present event (screen unlock). This only happened for the specific applicationId, changing the applicationId and nothing else and the service was not recreated & restarted.
Also, in logcat the following error appeared for a previously installed service
“unbound from accessibility service because it is not installed”
Going into Settings / About phone / Reset / Reset accessibility settings fixed both of these.