If he were on the line & it hit him exactly the same way & bounces out of play , it’s a clear pen. You know that .
We’re winning 4-1 so it’s no biggie but if that was a potential equalizer & it wasn’t given we’d all be doing our nut & the oppo fans would find it hilarious
I think the handball rule as explained here is good.

Premier League Rule Changes for the 2022-23 Season, Explained
Part of an ongoing effort to help you not sound daft at the pub.

I think they’ve applied it in this case well.
I don’t think where the defender is matters actually.