I got this issue a few times and also got it again just today. I'm playing on Nintendo Switch with Minecraft version 1.19.1
It happens when I'm running my world for some long time like hours and then the game just stop with the message "Your device is almost out of space...". then after clicking "Ok", the world has restarted. If after that I tried to make a copy of the world it will complain "You are almost out of data storage space! Minecraft has restricted access to this feature until you clear up additional storage space."
If I close the Minecraft application and retry the copy world again this time it was working fine.
My guess is that it sounds like some kind of caching gets too big and then this error occurs. That's why it can be resolved by restarting the app.
So, seems restarting the Minecraft app can be a workaround for this issue until the bug gets fixed. At least for me.
I'm using Minecraft on Nintendo Switch. Before version 1.18.30 was also slow and lag sometimes, usually when saving data to the disk but in acceptable conditions. After upgrading to 1.18.30, everything was super slow, and lag almost every few seconds. And then after a few minutes, the game was crashed about 3-4 times in a row, it happen not so long after the game started. The crashes happen when I was walking up the 2 blocks of stairs. I think around my 5th attempt then I have managed to get passed that killing zone to the outside of my chamber. After that, I was going into my aquarium (underwater), and suddenly the game was frozen for about 3-10 minutes (I think it should be around 7 minutes). After the frozen was ended, I was drowned to death. Hope this helps
No extra details to add than the others. Just a suggestion if possible can you provide any possibilities to rollback to the earlier version in the case of bug like this. The thing is it is too often that Mojang releases the bug that we cannot continue playing especially in Nintendo Switch. Many times that I stop playing for a long while waiting for the fix. If the bug cannot be fixed fast enough then better make it back to the old code. That would make players happier. It’s over than a month already that I stop playing. I believe many people are doing the same as me right now.