FWIW if this actually happens it's more likely the act of sending the message has made the server realise the user is no longer online.
It's inefficient borderline impractical for a server to send a frequent ping to every single user to check they're still online, usually it waits for them to perform an action within a certain timeframe and if they don't then either send the ping to see or just decide they're offline/away.
If you send a message that doubles as a ping to check