Beacon coloring issue

Details

Description

The bug

When a beacon passes through bedrock, usually it retains its color. However, if you put a solid block around all sides, and then put bedrock directly on top, the beacon beam turns dark (grey/black). Passing it through colored glass does not change its color visibly, except the first colored glass it passes through turns it even darker (black).

How to reproduce

Put down a beacon pyramid (any mineral, level)

Place a beacon on it

Put a solid block around all of its sides, and bedrock on its top

Note: there was a time, in a super flat world, where it wasn't working, and now it is. Either I was doing something wrong, or it doesn't work 100 percent of the time.