This bug has been in the game for ages, It's something to do with the Minecraft's lighting system that causes the issue. It could probably be fixed with turning smooth lighting off and brightness to moody.