I've certainly never logged IFR when teaching "instrument appreciation" in VMC.
Like many instructors I have occasionally taken students IMC - legally and safely within my licence, so that they can appreciate what real IMC looks like. But, frankly it's a lousy teaching environment for what you're actually trying to deliver, and that five minutes within an hour's lesson (let's say) - well log that if you wish legitimately - but to log the whole flight would be deeply disingenuous.
G