How does Smart wait work

I need your help regarding how the new feature Smart wait works.

We have no problem with Smart wait when we run our tests on our local machines but when we run them on Microsoft Azure Self Hosted Agents (Chrome headless) test cases fails randomly and we think it can be the smart wait function that is causing this.

Does anyone else have the same problem or have any thought about this?

On your local machines, do you also execute tests on a headless browser and the tests succeed ?

Sorry, I have missed your question. Yes, we execute our tests on our local machine on a headless browser and the tests succeed.