Hi Mark,
Using the gray instead of black will cause problems.
Gray, though, is not earth, it’s the O2- lead and is biased to +140mV. That’s why it needs to be cut, and you must connect the white/yellow wire to the O2 sensor side of the cut. The connector side of that cut must be insulated and left unconnected.
Did your instructions and harness come with a white/yellow wire in it? If not you have to add a wire. I can explain that, let me know. THE AF-XIED WORKS MUCH MUCH BETTER WITH THE GRAY WIRE CONNECTED CORRECTLY.
Also read here:
https://advrider.com/f/threads/2004-r1150rt-wideband-o2-sensor-project-and-af-xied-for-bmw.749080/page-110#post-38438354