I think i found the reason for the bug: buckets are giving less priority to water and more priority to blocks behind/under the water. Thus when we try to pick watee/lava, the bucket doesn't see the water/lava, it rather sees the background block. Also, buckets do seem to pick water/lava when there are no blocks in range of the player other than the water/lava source block. I've attached a video observation of the same..
I think i found the reason for the bug: buckets are giving less priority to water and more priority to blocks behind/under the water. Thus when we try to pick watee/lava, the bucket doesn't see the water/lava, it rather sees the background block. Also, buckets do seem to pick water/lava when there are no blocks in range of the player other than the water/lava source block. I've attached a video observation of the same..