- Yamato has observation haki, she could tell how strong Luffy was.
- Let's assume that it's really Kaido that appeared before Momonosuke, keep in mind that this is a manga with Oda controlling the plot:
- Oda chose to have Yamato leave Momonosuke just before Kaido comes to attack Momo.
- If Yamato had continued to guard Momo, she would have fought Kaido when he shows up to attack him.
- Oda is deliberately delaying Kaido and Yamato's confrontation.
Essentially, it doesn't matter how Yamato fights Kaido, what matters is that Yamato is intent on fighting Kaido. Kaido leaving the Rooftop is simply because Oda wanted to delay their confrontation, change the stakes, etc.
The story is being controlled by Oda, and he determined that Yamato vs Kaido is not starting now.