Proof :
In the first scan, we can see that SZ didn't needed Yamato anymore. Meaning he was sure that he won't be under IT and he left Yamato to let the God Tree catch and wrap him up.
Now, after IT, one day ended. And still, SZ was present at the same place where the shinobis were caught...