Thank you very much for your reply.
I managed to implement my solution with web workers, and I can confirm that for the browser web app works as intended (even with WebGL) and continues training even when the tab isn’t in the foreground (I am using Edge).
I am still facing issues with the Mobile Ionic App, but I don’t think it is related to TFJS. I will try also with the WASM backend.
Thank you again to your reply