Scroll vertical percentage accuracy

I currently encounter an issue with the scroll vertical percentage. it seems gives me different results for scrolling the same page from top to the bottom, it sometimes goes to 100%, sometimes only recorded 90+% .
I wonder what’s the underlining logic for Matomo tag manager tracking the scroll percentage?

My implementation was:

Event Value: {{ScrollVerticalPercentage}}
Trigger: scroll reach vertical percentage 10%

Hi,

You can find the source for the scroll trigger/variables here: