It does for me, but I'm not sure whether it does in a general way, or if that's because of some extension on the server I'm running.
I can send a message to my mates, or vice versa, and if we're not online those will be delivered to us next time we connect. It's been perfectly seamless.
However they have complained about multi-device support, where they want to log in sometimes from a phone and sometimes from a desktop. Apparently that is a less polished experience.
I don't know about public servers, but that's part of why I self host my own server for me and my mates. We all know each other, and we don't federate the server with anything else, even though XMPP supports that. The only way for anyone to join is if i send them an invite link, so randos can't show up.