Trust me, this had happen to me many many times. I can confirm that the player I'm messaging is online, but won't allow me to message that player, as the error says he/she is offline. If it helps, this has been happening for the past 3 weeks or so, and affected me on skywars, and barebones.
Not to mention, a week ago, when I tried to friend msg [/fr msg <player>] when he/she is online, an error occurred that mentions that it will deliver the message when they are online, when they are clearly online on the server