Oh, I understand, we had the same issue with rain getting through our pergola, this help. You said the leak only happens during heavy rain, so most likely the water rises above the ridge of the roof and then spills over the eaves. The wind that accompanies the rain doesn't help either. Basically, do everything possible to avoid flat roofs. They're awful and will cause you problems.