I was playing 1.16.3, and while playing on a friends server, I do not know if it was on 1.16.4, I suspect some of them were just playing latest release, but while playing on it, I fell off a platform in the end. I disconnected right before I died, since I had just repaired all my best armor at the enderman farm. My friend, the server owner, turned on keep inventory and had someone else die to prove it worked. I joined back in, and died instantaneously. My inventory had not yet loaded in, so when I hit respawn, I did not respawn with all my stuff. I do not understand fully what happened, but I am pretty sure keep inventory just saw that I had no items in my inventory on death, when in reality, they were just not loaded.
I have not yet tried to replicate it, so I will reply most likely tomorrow with my attempted replication. To replicate it, I am going to try to jump into the void again, and disconnect. I will do it on 1.16.4, and just fill my inventory with dirt or something pointless. I will jump into the void, and disconnect when I start taking damage. When I log back in, I will see if it replicates it.
What server software does the server use? With some third-party server softwares, gamerules work separately per dimension.