OnApplicationFocus is not calling inside Teams

We have a WebGL app hosted on server and we added this app to the Teams. We have a functionality that relies on OnApplicationFocus method. This method is working fine in our regular web link, on the web version of Teams BUT not in the actual Teams app. I think this is probably because:
Mac/Windows OS sends an event that the app has changed the focus (for example we switched from Teams app to Google Chrome) → this event is captured by Teams codebase => only Teams codebase knows when this event is fired.
Unity works in the same way BUT only in case if it is a standalone app.
Any suggestions how we can make the OnApplicationFocus work?

„Teams“ is Microsoft Teams?

You could instead react to pointer enter/exit window instead, perhaps this works better with integration. It may also be possible to write a custom Teams extension - if Teams has an API for extensions - that forwards this event.

Yes, I meant Microsoft Teams.
The pointer enter/exit sound not bad, but we have our app on the mobile version of Teams app so not sure if that will work fine

I have tried the pointer enter but it didn’t worked (although works fine on browser) Looks like Teams app does not let unity to recognise any app-related events. Any other suggestions?