All you have to do to reproduce the bug is place several beehives next to each other and wait for night or rain. The bees fly around randomly before occasionally picking a random hive to try to enter instead of prioritizing hives that have space for them to enter.
The easy way to replicate it is to place flowers around a crop farm and place the barrel and bed outside of it, when the farmer villager attempts to access their bed or their workstation they fail to pathfind through the flowers and just walk back and forth.