As mentioned above, in FAA usage, if you are rated you log PIC even with an instructor on board.
FARs require 40 hours of instrument time with 15 hours from an authorized instructor for the instrument rating. One could fly 25 hours under the hood with a safety pilot and 15 hours with a CFII and meet this requirement. Logged as PIC, no dual. If the safety pilot happened to be a wise, experienced CFII then valuable learning takes place without increasing the hours in the "dual" column.
While I see that as legal, I can't imagine than anyone here (In the US) would do that as PIC/dual is a moot point for us. I understand it's not logged as both in CAA/EASA schemes. It might have value for people who chose to train in the US. Just plan ahead.
Related - here the pilot under the hood and the safety pilot "both get to log PIC." (I realize it's not quite that simple.) Curious, who logs what in the UK/Europe?
I flew three or four cross country flights shortly after receiving my private pilot certificate, sharing the hood/safety pilot roles with someone else. I logged it as cross country. Years later I learned that only the pilot who lands gets the cross country credit, so my log book cross country total is actually a couple hours high. I have enough for whatever I need, so I'm not going to go back and change almost 30 years of page totals!