Of course, the fundamental question is: Who planned it that way? But well, that only helps to a limited extent in terms of finding a solution.
The question now is, what would your neighbor be willing to agree to? Of course, the gap should be sealed; for that, one could possibly also install/form a gutter. However, it must then be sealed tightly both to your wall and to the neighbor's roof. That way, the area would at least be kept dry. At the front, one could also install a closing sheet metal, and whether to fill the gap itself with insulation is certainly something to consider.
But what does the planner fundamentally say about the whole issue?