Sounds like the rocker panels, which have the sunroof drains terminating in them. There are tiny drain slots in them that can get clogged. If water gets in and can't get out, it will give you quite a sloshing sound, but once it stops raining, it might have time to drip out and then you won't hear the sloshing until the next deluge.
You can clear the drain slots by reaming them with the end of a stiff zip tie. There are also plastic drain plugs in the bottom of the rockers that you can just remove, either temporarily or permanently. Just be careful you aren't directly underneath when you clear the drains or pull the plugs, or you will get wet.