We know Yamato and Ace must’ve fought, as Luffy’s combat style and spirit reminds Yamato of Ace.

That being said, I have a theory as to why they clashed.

At this time Ace was not part of Whitebeard’s crew, which means he was probably still hunting Whitebeard to kill him and make a name for himself as an up and comer.

Maybe Ace expressed this desire to Yamato, that he was in the New World to go after Whitebeard. Yamato, recognized the name Whitebeard from Oden’s journal as a captain and comrade, so in the Oden disguise she perceived Ace as an enemy and they clashed.

To Yamato, she was defending Oden’s former captain Newgate. It is what Oden would have done.
*Theory by ahood34