The boiling temperature of liquid nitrogen is 77.355 K, oxygen boils at 90.188 K. So if the oxygen tank is later filled with liquid oxygen again for the next flight, the remaining gaseous nitrogen will neither solidify nor liquify. The nitrogen gas will just leave the tank together with boiled off oxygen during the next loading of LOX.
Liquid hydrogen is much colder, it boils at 20.271 K. So remaining nitrogen would even solidify at 63.15 K. Liquid helium boils at 4.222 K, so helium remains gaseous when liquid hydrogen is filled later and leaves the tank together with boiled off hydrogen.
Helium may have been used to drain the oxygen tank but nitrogen is much cheaper. Hydrogen could not be used to drain the oxygen tank for safety reasons. A mix of oxygen with hydrogen may explode.
Using helium instead of nitrogen does not save weight, there is no drain gas remaining in the tank just before launch of the Shuttle.