I transported a villager in a boat and it picked up the farmer profession from my composter. The next night a creeper exploded and destroyed the composter. When right-clicking the villager its trade hub opened for a split second and closed again. The villager refused to change profession, so I changed to version 1.14.4, but no difference. *I tried to change the villager's profession for an iron farm: https://youtu.be/4KbCqGz7noM
Then I put down a new composter and the villager's trade hub opened properly. So I put down a composter instead of a cauldron. The villager still refuses to change profession, but my farm works so I'm happy.