Whilst the flight might be under IFR, unless you are the sole manipulator of the controls in IMC you would be fooling yourself if you logged the 'actual' time yourself. What would it gain you?
I have never logged IF time for any flight of which I was commander if I was not handling the controls at the time.