Ok, it wasn't doing all the stuff. This resource was only updating the session, on which the online list is based:
\IPS\Session::i()->setAnon();
The rest of the places pointed out by you are checked by the method isOnlineAnonymously(), which checks a bitwise value on the members table (is_anon).
So after the change I've made locally, it is working in all places:
I will update the marketplace version and should be available in a few days.