So a 24Mp sensor, resolving 18mp of that 24 (the D5300)
Resolves more than a 20mp sensor resolving 15 of that 20 (the D500)
Did you actually do the math?
What is 15/20 as a %? (hint: it is 75%)
What is 18/24 as a %? (hint: it is 75%)
I think you will find that this lens resolves to about 75% of the sensor capability on "both" cameras.
The D500 would score more because of the larger photosites and ISO capabilities of that sensor coupled with this lens.
You overlooked the math, and overlooked the fact that scores are based on "both sensor and lens combination in each test"
Care to fail harder?