I think it has to do when the game thinks you're "outside" or probably a better definition is "exposed" or "not definitely inside". I see this a lot when standing near walls with an open window/door, or sometimes when plates are used as a ceiling (like the game doesnt count them as a true roof or something?). I have a few mods that play with the inside/outside darkness levels and when used, and you go into a poi (where it should be dark) you have to go inside a bit before the darkness kicks in, and it kicks in "entirely" not some slow fade as you get further from the light of the door (usually 2 blocks it seems?) I believe its because the game determines you are "not exposed to the elements, therefore you are inside".
Anyway, the rain effect is probably playing indoors because it thinks you're not 100% indoors and not exposed to any nearby openings or open sky above, prob within a 2 block radius from where the player is standing.