Lighting on non-solid blocks does not transition smoothly if there's solid blocks directly above them
(It affects 1.17.2 I just couldn't put that in.)
How to do it
1. Place a lantern (Not connected to a block)
2. place blocks over lantern
3. put carpet next to lantern but also under blocks
You should probably have gotten the bug by now. (By that I meant if you do the steps, you might have gotten that bug. I don't know how often it is )