When you activate the keepInventory gamerule in a dimension (for example Overworld) and then die in another dimension (for example Nether), you will not be able to get your stuff back.
I also found out that the bug can be got around simply by reactivating the gamerule in each dimension (before dying obviously).
It arrives to me when I was not registering so I recreated it with a demonstration video you can find in the following Dropbox link : https://www.dropbox.com/s/q3mn8fsyi4rrx2m/Minecraft%202019.05.17%20-%2012.27.50.02.mp4?dl=0
I am unable to reproduce this issue in 20w49a.