People need to realize is that Yamato's whole character arc here is about NOT being shackled down. Her devil fruit being regarded as "The Guardian Deity of Wano" should further enforce the notion that she will leave the Country. Whether it be as a Straw Hat, or by some other means, she is leaving Wano. This is the same thing Oden went through being born as the Shoguns son, and the fact that the borders of Wano were supposed to be closed. He didn't want to be shackled down either, and chose to follow his own path. That is what Yamato is trying to achieve herself.
Also, by the time this whole Kaido saga is finished, chances are that there would only be a few scabbards left over. Not to mention, that Wano will open its borders after this arc, so it will be very vulnerable to attacks from the outside, so it's possible that Yamato decides to stay on Wano to protect for a bit even if it's only till they get back on their feet. Oden forsook his country for his dream and Wano fell into hell for 20 years as a a result so we might see Yamato making the opposite decision. (Personally I hate this whole Yamato/Oden *forced* parallel but if we we are gonna persist with it till the end then I reckon this is outcome is feasible).
Lastly, it is important to note that unlike Oden, she can leave Wano anytime she so chooses to after this arc. Oden only had one shot at it.