your swapping result confirms that you do not have any defective/inop parts in your headlight assembly (ignitors, ballast, bulbs, etc). Therefore, this should be a major relief for you since replacing these parts are super expense.
also great good on confirming that the wireharness of both driver and passenger side is working.
I think the problem is your LCM/LKM (light control module) since this device controls all the lightning function in your car. the good news is that the LCM/LKM will report faults codes if it is being read by BMW specific code readers (not OBDII code reader since OBD2 is just for emission related stuff). So to help you troubleshoot the issue then bring your car to an indy shop for find a local fanatics that has BMW software and have them do a quick LCM diagnostic for you.
I hope this helps. Good luck