This is still an issue in 1.19. (We have to destroy our End Island on our realm because thousands of Endermen are spawning and not despawning.)
Also related but separate bug, this is still occurring even though the carriedBlockState command block was broken.
A similar issue occurred for my friend's Realm. Made a load of progress in my storage area, then log back on two hours later and it's all reset. Mojang please fix this! (Java Realm Issue)
This is still an issue in 1.19. (We have to destroy our End Island on our realm because thousands of Endermen are spawning and not despawning.)
Also related but separate bug, this is still occurring even though the carriedBlockState command block was broken.