Experiencing this issue in 1.19.3 with the added information that the bees, once over water, seem to be unable to pathfind back to land.
Four beehives depopulated over the period of three in-game days; after locating and breeding more bees and using name tags (name=tracked_bee) to ensure a handful generated log messages after death, the following log message appeared roughly 15 minutes later:
[18:35:34 INFO]: Named entity EntityBee['tracked_bee'/174423, uuid='cd99bb59-41ec-48d8-a9f5-64349e1eb3f8', l='ServerLevel[world]', x=-427.49, y=62.85, z=97.47, cpos=[-27, 6], tl=26961, v=true] died: tracked_bee drowned
The hives are located at roughly -280, 310, roughly 50 blocks from an ocean. The bee in question seems to have wandered over the top of the water and then became incapable of returning to land, instead wandering several hundred blocks in the opposite direction. After watching the shoreline following a second round of repopulation, all bees that wander over the ocean seemed unable to find their way back to their hives after and would continue to wander until eventually sustaining enough damage from accidental water collision that they died. Due to the way bees are impacted so severely after traveling over water, this seems to be some form of pathfinding issue; the bees appear completely incapable of returning to land.
The issue is still persistent in 1.21.3, however it has the caveat now that the cave lava fill is tied to sea level. Lowering the sea level causes the lava level to drop. The problem now seems to be that sea level and lava level do not function independently when specified to do so.