As I mentioned in another post here, I don't think I have ever written code on a whiteboard when explaining something. Explaining code has always happened in front of someone's computer, in an actual editor or IDE. Where I currently work, we typically pair on really hairy code.
We have a magic white board that can print out a big piece of paper showing everything on it. We also take pictures of it (and lesser white boards) to record designs agreed. Those pictures generally get put into a formal design document that is reviewed, signed, approved and all the rest of it.