It may be because the villager is holding the item while offering it to you, thus killing it would result in it being used.
Isn't it because fall damage doesn't reset after entering portal?
I can also confirm this in 1.21 pre-2
[media]
Oh OK
Can a mod label this as duplicate Please?
I think this is intentional...