How to handle sync issue in SAP GUI?

I am facing an issue to wait UFT untill SAP GUI window loads. Sometimes GUI window is taking more than 3 mins time to load and it is not consistent as well. I can see a floating loader going below menubar but that is not recognized by UFT.

Can you please help me on how to handle this sync issue?