after trying Locus Maps on my P20 Pro I am getting even more confused
First of all, can you link to the exact app you're talking about? There are numerous apps with that name, and I'd like to see which one we're talking about.
What it Locus doing in order not to get killed?
Well, a quick analysis from me would conclude that either they have managed to get into a pre-populated whitelist so their app isn't killed. Which could be completely possible, and still not in any way visible for you as user. On the other hand, if that's not the case, they seem to be doing something right.
One hint could be that so far the phone haven't complained about the app using power. That happened with the example app.
I don't really know enough about this to be sure. Please post the link to the app, and then perhaps we can ask Erel to see if he can find something that might be a clue to what's going on.
One thing that you might try, if you feel like it, is to uninstall the Locus app, and re-install the background location tracking example app. But this time use the exact same app id, and app name, as the Locus app. If it doesn't get killed (or the phone doesn't complain about battery usage), that would very much indicate that there's a whitelist in play. (It's not conclusive, but it would be a huge hint.)