The bug
I found a naturally generated bee nest with 2 bees and everything look right, until they entered the nest, they can't go out of it. they exit the hive for a split second then they go back.
I also placed lots and lots of bee nests in creative mode and after a while, no bees wandering, just split second glimpses of they trying to get out. They spawn outside the bee nest and enter it again, after some time I managed to screenshot a split second bee, the image is attached (look how there are lots of nests and no bees. also look at the sound transcription, every second or so some bee fail to escape).
Even with campfires underneath the bees won't go out.
My theory is that, a bee can enter a bee nest, exit it, enter again, and then is stuck. in other words, they can exit the bee nest only once.
Video
Video by @unknown:
https://www.youtube.com/watch?v=pzkDdvquWWY
Linked issues
is duplicated by
Attachments
Comments
Confirmed, at least for bees that exit the nest after nighttime.
Edit: Also just confirmed for bees at any time. This glitch is probably caused because bees can now enter their nests without being "pollinated", causing an infinite loop of bees not escaping.
Here's a video of the bees popping out and immediately back into the nests: https://www.youtube.com/watch?v=pzkDdvquWWY Hope this is helpful. :3
This is happening on my server as well, both day and night.

I can confirm this for at least one of my hives.
In my experiments, bee overpopulation despite lots of hives seemed to be a factor in triggering this issue (but once they had entered this state, culling the other bees to resolve the overpopulation didn't do any good); luring a lot of bees with a flower also may have contributed, but I couldn't identify a clear pattern.
Silk touching an affected hive and placing it somewhere else seemed to have some effect on the situation, in that individual bees would subsequently pop out their heads for more than just a tick before returning, and one even got "unstuck", but this seems to be neither a reliable nor a permanent cure.

Reverting to version 19w44a got my bees "unstuck" - but once I switched back to 19w45b, the bees were stuck again the next time they entered the hive, except for a baby bee "born" in 19w44a (which unfortunately and for unidentified reasons flew away - laden with pollen - without returning to the hive a second time, so I can't say whether it would have suffered the same fate).

This bug gets weirder though. I've seen bees able to reliably get in and out only to get stuck for unknown reasons. This seems to kick off sometimes, when a new bee shows up and enters the nest. I suspect the bug might lie in the bee's AI, since only certain bees get stuck while others can escape.
Still in 19w46a
The server I use updates automatically to the latest snapshot within an hour or two of its release.
This bug was a problem for me in previous snapshots, depending on the direction the hive faced (hives facing North or West worked, but in other directions they would exhibit this bug). I put them all facing north and it's worked for quite a while... til today.
Now with 19w46a none of the bees are exiting the hives that previously worked as recently as a day ago.
my observation is that the bees work fine for the first day in their nest or hive, but after a night goes by, they are stuck.
This didn't occur for me until 46a. I think they are too intimidated to leave. Poor guys
I tried to bring flowers right up to the hive; free delivery of nectar right to your doorstep! The bees weren't going for it though. XD
Noticed the same thing both in single player and on a server with snapshot 19w46b
according to my observations they have more problems when there's blocks above.

I made a datapack to see some data from bees and hives.
I want to add to this report that when this bug start to happen, the TicksInHive changes from 2400 to 600. Maybe the bug is in the hive block and not in the bees
I've also been having this issue
I saw the same issue after updating a 19w44a world to 19w45a. Every few seconds bees in my nests exit briefly and disappear into the next again.