I would think that REALM players would get a higher priority because we are paying every month for the REALM.
For some reason with the new version 1.14, the villagers are wandering off in a South West pattern and not returning to the village at night. Right now, they are gathered into a corner that is fenced in to prevent them from wandering off further.
So the first screenshot shows the villagers out wandering around at night instead of running indoors. The second screenshot shows the villagers all of the way in the South West corner of the fence. The third screenshot shows the villagers in the South West corner of the fence instead of running for the doors.
My girlfriend and I determined that many of the villagers wander away from our villages because, there are no villager tools and beds in our villages. Once we build villager tools and beds, the villagers wandered back into our villages.
So this issue is resolved.