I know the output slot for looms & villagers are too big (see MC-212619), but unlike the other containers, they are also off centre.
(i.e. the centre of the highlight square is not the same as the centre of the slot texture background)
see the pictures, for the loom there is 5px of space above the grey square background to the blue banner item, but only 3px below it.
The issue with Looms has been resolved as of 1.20.2-pre1.
For the villager there is 3px of space above, and 5px below
Note that the item is centred relative to the input items, it's just the texture background itself that's the problem.