I don't understand your problem. The underlay membrane is only there for emergencies in case roof tiles break or something similar. Normally, no drainage runs over it, only through the roof tiles. The drip edge at the end of the underlay membrane is correct and important (see emergency above). The photovoltaic hooks are on the rafters. For that, the roof tile below must be notched out. No water gets through there; the tiles overlap by about 15 cm.