The villager has a name, i forgot which mod added names, but the vanilla method doesn't support that, normally named villagers lose their respective uis.
There's also another resource pack which somehow manages to replace the trades text while not breaking my trades text