how to I stop the automatic download of all refernces found in an online search?

I did the patch, I replaced the ‘cite while you write’ file but it is still adding all references found to the currently open library

You mean patch for X2? Training video is here.

Take a look at “Online Search in Online Search Mode”. It explains how to do the online search in >X2.0.x