This is happening to me all the time at present - here it only happens to two buckets, but sometimes it can happen to several, or even all buckets in my hotbar.
What you're looking at is, 5 buckets of lava in my inventory, and 5 in my hotbar. As I go to move the first bucket from my hotbar to my inventory, both it AND the second bucket on my hotbar spontaneously empty themselves. It doesn't seem to matter how many I have full or empty, but I have only noticed this bug when I have a lot of buckets in my inventory. I left an empty inventory slot in case it's doing any funny "swapping" in the background (being the scenes in the program) for a full bucket, but still occurs.
edit: I'm *guessing* it's something to do with a duplication bug in Minecraft, and that what's actually happening is it's figuring out I "shouldn't have" those buckets of lava when I go to move them, and then takes it away.
Lava is not meant to be duplicatable however the other day I was able to get 6 buckets of lava out of 12 (due to a bug, which I wasn't able to reproduce). Now - still just guessing - maybe if the buckets stay on the hotbar the whole time, it never "corrects" the error, allowing you to place the bugged lava, but trying to move them to inventory kicks in some error correction?
Just guessing this as when this "bucket emptying" phenomenon occurs, there's usually a spot of lava back randomly somewhere in the lava well where I just got it from - sometimes several. It still looks like "half blocks" of lava, but is collectable. (ie, it disappears out of the bucket, but ends up back in the hole - kinda like lag, except there's an indefinite period of time between when I collect the lava and move it out of my hotbar). However, it doesn't always appear "back" there, so definitely losing some lava (and apparently, duplicating some - guess it all evens out :P)
Confirmed it with further testing. It's a duplication bug with lava on bedrock. In this video, I'll keep picking up the duplicated lava (so all my lava comes from one source) then try to move a bucket to inventory, and .. see for yourself..
And no.. you can't keep it in your hotbar and use it, or this happens:
--- snip ---
EDIT: Sorry, taking out dupe method - I believe it's against server rules (even if its an unwritten rule). I realise now that when I did the 6 > 12 dupe the other day I was unintentionally exploiting a bug here. Won't happen again!
Ive never gotten a dup on all my lava buckets. But I have encountered it emptying the bucket a lot. I always figured it was more of a reading type error, where the game let you take bucket from a shallow lava instead of a real lava square. Which then is double checked when you move the bucket.
I always move them from my bar to my inventory to make sure they keep their lava. If it goes away I just try a different location to pick it up from.
Other times it is also related to lag. I have picked up a lava spot moved it and had it vanish, and saw the lava spot respawn again.
Yes, there's some funny things with lava. I've noticed that there's cases where half blocks of lava will continue to flow even when the originating full block has been destroyed/removed.
Although the scythe isn't pre-eminent among the weapons of war, anyone who has been on the wrong end of, say, a peasants' revolt will know that in skilled hands it is fearsome. -- (Terry Pratchett, Mort)