well, the GDPR does not forbid a browser to transmit your 'online' status to a site.
and basically being "online" is defined by being logged in, *and* if the window running the game has focus (i.e. if using multiple tabs, the tabs not being viewed right now do NOT have focus, i.e. you are not actively online there).
and it's also a very common feature on most chat programs to show who's not afk (simply by checking when last text/action was sent to the server), so i don't see why this should be too hard to implement