You can wrongly see stray pixels of the sky through solid blocks if they have a custom model.
Reproduction Steps:
Download and enable the 3D Chiseled Bookshelves resourcepack from https://vanillatweaks.net/picker/resource-packs/
Join this minecraft world: New World (27).zip
You should see the stray pixels everywhere
Expected Results:
There would be no stray pixels of the sky visible
Observed Results:
Stray pixels of the sky appear through solid blocks
Can confirm in 1.21.7