Like your AC at home the cold coils cause condensation. This caught in a pan in the furnace in a house and then drained with a hose to somewhere on the floor.
On a rooftop RV the catch basin pan is almost level with the roof and drains out onto the roof. If you tiny drain hole is plugged with dust, leaves, mold or maybe in your case styrofoam the drain pan overflows. And down on your head it comes.
The other alternative is it is draining properly onto the roof but the rubber seal between the roof and the bottom of AC unit is not tight then the water drains into the RV when the angle of the roof is right. And down on your head it comes.
I would check up on the roof. Here is one youtube to get some idea. More out there on this subject. I have never needed to tighten my roof seal so no experience there,