I just scanned the car again and I got DSC 5dea error which has something to do with the transfer case. I am pretty sure I might have seen it before but I just cleared it and for some reason it didn't triggered any thought to connect it to the noise I had.
Now I am pretty sure it is not the resonator. That indy didn't diagnose it right.
I did a search and found the same issue on X3 but no solution.
BMW X3, 2004, 2.5cc, auto gear, Petrol. "5dea Transfer case Temperature? - Fixya
BMW X3 2004. Diagnostic computer error message "5dea Transfer case Temperature
BMW X3 2004-2.5 litr. error message
Any thoughts? Could it be the transfer case actuator?