I'm not self hosting, so I'm depending on what the server admin enables, and the policies they establish.
That said, the server fully supports xep-0313, which perhaps among other things control messages being kept on the server precisely for the purpose of sending them to all registered devices, thus allowing the sync.
But perhaps there's a policy in place removing the messages from the server as soon as some device has gotten it, leaving only online devices with the ability to grab them. I don't know if that's possible...
I experimented getting a device offline for a couple of minutes, and then exchanged messages with another account, and also to my same account. Then eventually I got the device offline, and none of the messages, not even the ones sent to myself, were ever synced on the device just coming online...
This is really sad, since that's precisely one of the benefits of having servers over peer to peer solutions, it's easier to sync devices through the server.
Might this be some sort of policy to keep disk usage on the server low?
I might need to explore some other server if that's the case...
Thanks !
Edit: Communicated with the admin, and they mentioned this was unexpected.
You need to tell us with clients and if possible which server. It should usually not happen, but some outdated clients do exhibit similar issues.
On the office laptop an my PC (both running artix gnu+linux) I'm using dino and on the phone (lineageos for microg) I'm using conversations.