When a player (yourself / opponent) goes idle, a movement discrepancy / difference is created that all players see

Need soloutions

For example, whenn a playeer goes idle in-game by switching tabs, screens or windows that
move the game to the background, their player movement freezes which causes a
difference in the game play of the opponents. How do you ensure that all players in-game
always see the exact same character positions and movements regardless of idle players?

Not quite sure the issue, but you might be able to use this:

Application.isFocused()

or this: