Hello: Installed properly, I can’t think of a condition where significant rain could get into a heater. Only the inside of a heater is protected by the glass lining, but it sounds like the bare outside of your tank has been wetted repeatedly. Violent shaking makes me wonder if there is a safety concern here.
Without photos and more information, this is pure speculation. It may be the relief valve is not hooked up to a drain line, or a pressure problem, or both. Whatever, we need to figure it out 😯