The IS300-specific official info on this is here and here.
There are troubleshooting procedures outlined there, also further here and the main one to do is probably testing the resistance of the sensor, providing you have a multimeter,
I don't really know whether this is usual failure, but I guess it's not impossible that it's starting to fail, so it works some of the time and not at other times. The O2 sensor has a heating circuit to enable it to work efficiently, and maybe something is going wrong with this, and some of the time it's warm enough to work ok and at other times not ? Just a guess.
Could also be a loose wire of course but IMHO I think this is less likely unless there's been some recent work done in that area.