I tried to reproduce the issue but it always returns 1050, which is the correct answer.

Tested with a right click + `show address`.  Inside buildings or on public space.
Also, with the following text strings:
"9 place du luxembourg, belgium"
"quartier léopold, restaurant, belgium"

It always returns 1050.
It will return 1047—from the EP—only if that is the nearest neighbour and if there are no postal code areas.

There was a bug in Nominatim—and I am grateful to you for being the first to notice a problem 😉—but it was solved.

I am willing to help.  Do you know how we can reproduce the issue?