Rain will render through blocks and underground with no observed graphical cause or correlation. This issue is separate from the already listed issue where rain renders through blocks when clouds are turned "off" and graphics are set to "fancy".
Environment
1.16.5 without optifine, 1.16.5 with optifine, Windows 10 pro 64 bit.
Please check if the fix in MC-179845 solves this issue. Your world probably got corrupted if you opened it in a certain snapshot.