If they are acting in their official capacity as a representative of the government, then they have no right to privacy in those official dealings. There was a very recent court ruling that essentially said that. Of course, in that ruling, the officer was clearly on duty. However, that was not the reason he had no expectation of privacy. It was that he a government official conducting official business.
Actually, I believe you are referring to the case in MD involving the speeder on the motorcycle with the helmet-cam, which the courts tossed because of an "no expectation of privacy" defense.
If it IS that case, you are wrong--the FIRST officer to respond to that event--the guy in plain clothes, in an unmarked car who jumped out of his vehicle with his gun drawn and screaming orders--was in fact OFF DUTY.
There really is NO SUCH THING as "on" or "off duty". If a crime is committed in front of ANY sworn LEO while in his jurisdiction, he is legally entitled to act as if he was "on duty" if it's his day off, or he just got off shift, or whatever. So technically, the ONLY functional difference between on- and off-duty is the clothes the person is wearing and the vehicle they are driving...
As for the expectation of privacy issue, I think that depends on what the LEO is doing. If they are harassing you, and asking questions, or trying to somehow exert authority (saying "I'm a cop, and you can't do that", etc...) then recording them would be OK. If however, you were just talking to someone in WalMart about hamburgers, or the newest hammer from Stanley, then I think there WOULD be a reasonable expectation of privacy...
The REAL answer to this question, however, is SIMPLE. Move to a State that has "one party consent", where you don't have to worry about such silliness such as cop-shielding statutes...