Perhaps some EASA definitions may help to resolve the confusion surrounding the OP's question (SERA = Standardised European Rules of the Air).
Visual Meteorological Conditions (VMC) Conditions of visibility and distance from cloud equal to or greater than the minima detailed in SERA.5001
Instrument Meteorological Conditions (IMC) Conditions of visibility and distance from cloud less than the minima described in SERA.5001
Visual Flight Rules (VFR) Rules under which flight may take place in VMC as detailed in SERA.5005
Instrument Flight Rules (IFR) Rules under which flight may take place in VMC and must take place in IMC as detailed in SERA.5015
Instrument Flight Time (IFT) The time during which a pilot is controlling an aircraft in flight solely by reference to instruments
Note:
Flight under IFR does not necessarily imply flight by sole reference to instruments. A pilot may elect to fly visually but under IFR in VMC
Flight by sole reference to instruments does not necessarily imply flight under IFR. Instrument training may be conducted under VFR in VMC using a means of simulating IMC (simulated IF)
Flight under IFR in any flight conditions requires the pilot to hold an instrument rating
For issue of an ATPL, a pilot must have at least 45 hours instrument flight time, beyond this there is no point in trying to pad the IF hours. For instrument instructional privileges, for example, it is not instrument flight time that is important but flight time under IFR, hence the OP's question. A flight may be conducted wholly under IFR (as are most commercial air transport flights) in which case IFR is logged from off blocks to on blocks, or partly under VFR and partly under IFR, in which case only that proportion of the flight spend under IFR may be logged (obviously). The decision to operate under IFR in VMC (and clear of controlled airspace) is entirely that of the pilot-in-command