Let's imagine that we have launched a single-player game, if the user switches another browser tab, and then returns to the tab with the game then he will see exactly the same picture as was at the time when he left the tab. because requestAnimationFrame will not refresh the canvas if the tab is closed.
And now if you imagine a multiplayer game-this situation will be terrible!
Even if it is not a PvP game, but simply showing the movement of another player.
Or for example , it is a space simulator and the player's ship flies in space - it must fly, even if the tab is closed, and not immediately draw the jump the entire animation at the time of activating the tab.
I assume that here you can use sockets from the server and for example once a second run on the client wade function.forceRedraw - but the question is-will the frame be redrawn if the tab is not active?