Thank You for the fast replay, I would be very grateful for the part number if possible. I tried switching one of the control units under the lamp between right and left headlamp but with no luck, passenger headlamp still malfunctions so that's not the problem. I didn't know that there is a second one when I took the whole front apart, I would switch both. There is one aluminium "colored" ballast and one big, plastic, squared control unit for LEDs (DRL, turn signals etc). I will be switching the third control unit / module that is in the passenger footwell tomorrow since StarDiagnosis pointed to that module but I personally don't think that's the issue. I only hope that it is not a mechanical problem with the headlamp but some electronic malfunction.
Do I understand right, switching the module would fix Your problem but You have changed the whole headlamp since that's what caused the issue?