Sounds like terminology isn't quite right there and the way things are counted for apps (which have no screen off counter) seems to be different than the overall counters which are for screen on and screen off.
Because they are different metrics, I believe anyway. Saying this is convoluted is an understatement.
Activity is actual time based with a blue and light blue chart that shows you the amount of time the device wasn't idle. Blue being time the screen was using battery, light blue being the time screen was off using battery and the remainder of the time being idle.
Activity by App is how long specific apps used battery. Since iOS can multitask these numbers can't be added together because you'd get a number greater than the elapsed time.
Here is a screen shot from my iPad.
To simplify it I selected 3am to 4am.
The on screen time adds up to the Screen On time. However this doesn't always have to be the case with multitasking, if I was in safari for 1 hour while watching Prime Video picture in picture for 1 hour that would add up to 2 hours of app use in a single hour. Background task can happen concurrently with foreground task, background task, with each other or any combination.
I used that as a specific example of background task since at some point background and on screen activity were happening from the same app.
I've never paid much attention too it but I just assumed when using the phone the screen was technically on, turning the LCD off at times based on time or proximity sensor but not locking it thus indicating Screen On and on screen time. I'll have to check it tomorrow though.