Being on normal/hard once disables keep inventory forever, without cheats if you're trying to go to easy or peaceful
Steps to reproduce:
Create a new world with cheats disabled and set the difficulty level to either easy or peaceful.
Enter the world, fill your inventory with a few items, and find a way to die.
Change your difficulty to normal or hard and repeat step 2.
Change your difficulty back to easy or peaceful and repeat step 2.
Observed results:
After dying in either peaceful or easy difficulty the second time, keep inventory will not be in effect and will permanently disable itself for that world.
Expected results:
Keep inventory should be toggleable (by changing difficulty), and the player should have the option to decide whether they want to enable or disable it.
Attachments
Comments 2

Can confirm.
Steps to reproduce:
Create a new world with cheats disabled and set the difficulty level to either easy or peaceful.
Enter the world, fill your inventory with a few items, and find a way to die.
Change your difficulty to normal or hard and repeat step 2.
Change your difficulty back to easy or peaceful and repeat step 2.
Observed results:
After dying in either peaceful or easy difficulty the second time, keep inventory will not be in effect and will permanently disable itself for that world.
Expected results:
Keep inventory should be toggleable (by changing difficulty), and the player should have the option to decide whether they want to enable or disable it.